Skip to content

Commit

Permalink
[BUGFIX] Only provide fields which do not break other backends
Browse files Browse the repository at this point in the history
  • Loading branch information
vertexvaar committed Mar 26, 2018
1 parent 8a42ed1 commit 3fab8dc
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion Classes/UserRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,27 @@ class UserRepository
*/
protected $connection = null;

/**
* @var array
*/
protected $fields = [
'tstamp',
'username',
'description',
'avatar',
'password',
'admin',
'disable',
'starttime',
'endtime',
'lang',
'email',
'crdate',
'realName',
'disableIPlock',
'deleted',
];

/**
* BackendUserRepository constructor.
*
Expand Down Expand Up @@ -49,6 +70,6 @@ public function getUserState($user)
public function getUser($user)
{
$where = 'username = ' . $this->connection->fullQuoteStr($user, 'be_users');
return $this->connection->exec_SELECTgetSingleRow('*', 'be_users', $where);
return $this->connection->exec_SELECTgetSingleRow(implode(',', $this->fields), 'be_users', $where);
}
}

0 comments on commit 3fab8dc

Please sign in to comment.