1
0

Added new (clean) yii boilerplate

This commit is contained in:
2014-05-13 12:40:42 +02:00
parent 1d6d975a16
commit 99d29b432b
1983 changed files with 653465 additions and 17 deletions

View File

@@ -0,0 +1,20 @@
<?php
class UserIdentity extends CUserIdentity
{
/**
* Authenticates a user.
* @return boolean whether authentication succeeds.
*/
public function authenticate()
{
$password=Yii::app()->getController()->getModule()->password;
if($password===null)
throw new CException('Please configure the "password" property of the "gii" module.');
elseif($password===false || $password===$this->password)
$this->errorCode=self::ERROR_NONE;
else
$this->errorCode=self::ERROR_UNKNOWN_IDENTITY;
return !$this->errorCode;
}
}