Help with user password verification
#1

Fixed!
Reply
#2

Код:
SELECT * FROM `accounts` WHERE `UserName`='Kusums' AND `Password` = 'asdasd'

//code to get all informations from this column
Reply
#3

You mean like this?
PHP код:
if(!strcmp(inputtext,password)
{
//if the password matchs
}
else
{
kick(playerid);

Reply
#4

Fixed!
Reply
#5

Quote:
Originally Posted by Sc0pion
Посмотреть сообщение
I have everything set up, I can register a User from server to the database, and load things from database but the problem is that I can't login.
I am wondering how can you load other stuff from the database and not the user's password? Also, it depends on which version of MySQL plugin you are using in order for other people to help you out. Since the functions differs from old and the new one.
Reply
#6

Fixed!
Reply
#7

Quote:
Originally Posted by Sc0pion
Посмотреть сообщение
Please do not suggest me to read any threads because they teach me to execute the below given query and to see if row exists, give player access
I'm pretty sure not a single thread will teach you to use unhashed passwords.
Reply
#8

Fixed!
Reply
#9

Quote:
Originally Posted by Sc0pion
Посмотреть сообщение
It doesn't matter if it is hashed or no, I just want to know how to code where it will check input hashed password is equal to retrieved password from MySQL. Anyways when registering, the password is hashed before it gets stored to database, so I have to hash the inputtext to see if retrieved password is equal to inputtext.

Lets just say if MySQL_Password = HashedInputtext, access, else kick?

By the way I use WP_Hash.
This basically does not make sense, mate. You are saying it doesn't matter if the password is hashed or not, it DOES matter in many ways if you actually care about your server. And if you are saying you just want to learn how to code it, start off with the tutorials available. The tutorial has explained how to do what you're looking for very well, with hashed passwords.
Reply
#10

Fixed!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)