1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/limesurvey_ynh.git synced 2024-09-03 19:36:32 +02:00
limesurvey_ynh/sources/framework/gii/components/UserIdentity.php

20 lines
No EOL
552 B
PHP

<?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;
}
}