0
Votes
incorrect password error when trying to login with database values?
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
Possibly related Questions
-
How to send file from model to another model..?
April 8, 2012 By eibrahimov 1 Answer
TAGS
actioncreate ( x 2 )ACTIVERECORD ( x 4 )AJAX ( x 10 )ajaxSubmitButton ( x 4 )AR ( x 2 )cactivedataprovider ( x 2 )CActiveForm ( x 2 )cactiverecord ( x 2 )CGridView ( x 14 )CJuiAutoComplete ( x 3 )CJuiDialog ( x 8 )CListView ( x 8 )controller ( x 7 )Css ( x 2 )CStarRating ( x 2 )CTreeView ( x 2 )database ( x 5 )dialog ( x 2 )dropdownlist ( x 3 )EGMaps ( x 3 )extension ( x 3 )file ( x 2 )form ( x 6 )Giix ( x 2 )gridview ( x 2 )html ( x 2 )javascript ( x 3 )many_many ( x 4 )merge ( x 2 )model ( x 4 )Modules ( x 3 )multilanguage ( x 2 )php ( x 2 )redirect ( x 4 )Registration ( x 3 )relations ( x 5 )renderPartial ( x 8 )session ( x 2 )sorting ( x 3 )sql ( x 4 )url ( x 3 )urlManager ( x 3 )validation ( x 3 )yii ( x 11 )YiiAnswers Site ( x 4 )This website counts Questions and 429 Answers by 8949 registered users.

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
The problem is solved, Thanks anyways @tonydspaniard
By mint · 332 days 12 hours 6 mins ago
Questions: 2 Accepted: 0 ( 0% ) | Reputation: 0