Hi everyone, I’m really new to yii and I’m stuck. Basically I have a user management module (called userManagement) within which is the User model which I’m trying to use for user authentication via a database relation ‘user’. However the I’m using email/password instead of username/password and I’m hashing the password (md5). However each time I attempt login I get the ‘invalid email address or password error’. (believe me I’ve checked the credentials and I’m entering them right)
I’ve attached my LoginForm.php, UserIdentity.php and User model class. Help Anyone??
try to overwrite the default CUserIdentity constructor - because the CUserIdentity constructor save the first parameter (email/username) to the $username instead of $email:
class UserIdentity extends CUserIdentity
{
private $_id;
public $email;
public function __construct($email,$password)
{
$this->email=$email;
$this->password=$password;
}
...
}