Funciona: - Usuario - Empresa git-svn-id: https://192.168.0.254/svn/Proyectos.Incam_PROFIND_Web/trunk@2 3fe1ab16-cfe0-e34b-8c9f-7d8c168d430d
20 lines
541 B
PHP
20 lines
541 B
PHP
<?php
|
|
|
|
class UserIdentity extends CUserIdentity
|
|
{
|
|
/**
|
|
* Authenticates a user.
|
|
* @return boolean whether authentication succeeds.
|
|
*/
|
|
public function authenticate()
|
|
{
|
|
$password=Yii::app()->getModule('gii')->password;
|
|
if($password===null)
|
|
throw new CException('Please configure the "password" property of the "gii" module.');
|
|
else if($password===false || $password===$this->password)
|
|
$this->errorCode=self::ERROR_NONE;
|
|
else
|
|
$this->errorCode=self::ERROR_UNKNOWN_IDENTITY;
|
|
return !$this->errorCode;
|
|
}
|
|
} |