Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Server Development
Habbo Retros
Habbo Q&A
RevCMS BCRYPT
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="MayoMayn" data-source="post: 400839" data-attributes="member: 71840"><p>Just change your userValidation function to this.</p><p>[PHP]</p><p>final public function userValidation($username, $password)</p><p> {</p><p> $query = mysql_query("SELECT `password`FROM `users` WHERE `username` = '".mysql_real_escape_string($username)."' LIMIT 1");</p><p> $dbpass = mysql_result($query, 0);</p><p> return password_verify($password, $dbpass);</p><p>}</p><p>[/PHP]</p><p>And change the if statement you had before to this, basically just without the hashing part.</p><p>[PHP]</p><p>if($this->userValidation($template->form->log_username, $template->form->log_password))</p><p>[/PHP]</p><p></p><p>If this doesn't work, you're simply just doing something wrong. Did you truncate your users table, or did you hash all the existing md5 hashes with the bcrypt? Because, then thats why, if this doesn't work.</p></blockquote><p></p>
[QUOTE="MayoMayn, post: 400839, member: 71840"] Just change your userValidation function to this. [PHP] final public function userValidation($username, $password) { $query = mysql_query("SELECT `password`FROM `users` WHERE `username` = '".mysql_real_escape_string($username)."' LIMIT 1"); $dbpass = mysql_result($query, 0); return password_verify($password, $dbpass); } [/PHP] And change the if statement you had before to this, basically just without the hashing part. [PHP] if($this->userValidation($template->form->log_username, $template->form->log_password)) [/PHP] If this doesn't work, you're simply just doing something wrong. Did you truncate your users table, or did you hash all the existing md5 hashes with the bcrypt? Because, then thats why, if this doesn't work. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Q&A
RevCMS BCRYPT
Top