Witam,
Jestem tutaj nowy i dopiero zaczynam sie uczyc Yii na podstawie bloga (i pisze przy okazji wlasnego wg swoich potrzeb).
Mam taki problem z uwierzytelnianiem, moj
public function authenticate()
{
$username=strtolower($this->username);
$user=Uzytkownicy::model()->find('LOWER(nazwa)=?',array($username));
if($user===null)
{
$this->errorCode=self::ERROR_USERNAME_INVALID;
}
else if ($user->haslo!=$this->password) {
$this->errorCode=self::ERROR_PASSWORD_INVALID;
}
else
{
$this->_id=$user->ID;
$this->username=$user->nazwa;
$this->errorCode=self::ERROR_NONE;
}
return $this->errorCode=self::ERROR_NONE;
}
I w teorii powinien dzialac, ale ciagle mi pokazuje Incorrect username or password. Ktos wie/podejrzewa jak to jest zrobione?