а ларчик просто открывался.
public function rules()
{
return array(
// username and password are required
//array('username, password', 'required'),
array('username, password', 'safe'),
// rememberMe needs to be a boolean
array('rememberMe', 'boolean'),
// password needs to be authenticated
array('password', 'authenticate'),
);
}
if (empty($this->username)) $ldapuser = User::model()->find('LOWER(login)=?', array(strtolower(getenv("username"))));
if ($ldapuser)
{
$this->_id = $ldapuser->id;
$this->username = $ldapuser->login;
$this->errorCode = self::ERROR_NONE;
}
else if ($user === null)
$this->errorCode = self::ERROR_USERNAME_INVALID;