mirror of
https://github.com/LBRYFoundation/pool.git
synced 2025-09-20 01:09:48 +00:00
21 lines
No EOL
575 B
PHP
21 lines
No EOL
575 B
PHP
<?php
|
|
|
|
class UserIdentity extends CUserIdentity
|
|
{
|
|
/**
|
|
* Authenticates a user.
|
|
* @return boolean whether authentication succeeds.
|
|
* @throws CException
|
|
*/
|
|
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;
|
|
}
|
|
} |