Register here!

Forgot password?

ASK NEW QUESTION

Home Page » Forms » incorrect password error when trying to login with database values?
0 Votes
Vote Con!

incorrect password error when trying to login with database values?

databaseLogin Page

I have entered username and password directly in the database, now when i try to login with the data values in the default login page, it says incorrect password?

By mint in Forms · Asked 340 days 7 hours 52 mins ago

Questions: 2 Accepted: 0 ( 0% ) | Reputation: 0

 

Answers (4)

  1. 0 votes

    How is your UserIdentity validates your login? Does it checks the database directly? We need more info to help you out :)

    By tonydspaniard · 335 days 18 hours 7 mins ago

    Questions: 2 Accepted: 0 ( 0% ) | Reputation: 0

    • Yes it checks the database directly, without any encryption. I have printed out the error code in the log file, it shows error code is 100 which is i think is unknown identity error so my first perception(password incorrect one) was not right now, the application was showing the default error which is unknown identity. Here is UserIdentity.php http://pastebin.com/emWFEwZc Here is LoginForm.php http://pastebin.com/r8WxW0CQ Here is SiteController.php http://pastebin.com/VYL3DcXV Here is login.php http://pastebin.com/0BhbhbmU

      By mint · 335 days 7 hours 17 mins ago

    • I have just checked your pastbin and sorry to say that i a bit messy. I wouldn't include the strncmp there and check for non-zero but to check for its validity: if(strncmp($pass1, $pass2, $n) === 0) /* ERROR_NONE */ return true; I would not recommend non-encrypted password values on the db, and string comparison is always a pain.

      By tonydspaniard · 332 days 17 hours 47 mins ago

  2. 0 votes

    The problem is solved, Thanks anyways @tonydspaniard

    By mint · 332 days 12 hours 6 mins ago

    Questions: 2 Accepted: 0 ( 0% ) | Reputation: 0

© YiiAnswers.com 2011. All rights reserved.

Switch to our mobile site