1
0

Added newest update from EGH

This commit is contained in:
2014-06-08 15:32:00 +02:00
parent 2f5c31b696
commit ebd369adcf
5 changed files with 266 additions and 30 deletions

View File

@@ -17,15 +17,11 @@ class UserIdentity extends CUserIdentity
*/
public function authenticate()
{
$connection = Yii::app()->db;
$command=$connection->createCommand("SELECT SValue FROM {{othervalues}} WHERE Name = 'AdminPassword'");
$pw = $command->queryScalar();
$users=array(
$users = array(
// username => password
'admin' => $pw,
'admin' => MsHelper::getStringDBVar('AdminPassword'),
);
if(!isset($users[$this->username]))
$this->errorCode=self::ERROR_USERNAME_INVALID;
elseif($users[$this->username]!==$this->password)