$this->setHost($aCommand[2]);
// Now we check if the given user is valid
- $sUser = str_replace(array('%20', '(a)'), array(' ', '@'), $aCommand[1]);
+ $sUser = str_replace(['%20', '(a)'], [' ', '@'], $aCommand[1]);
// Does the hostname match? So we try directly
if ($a->get_hostname() == $aCommand[2]) {
$this->setHost($aCommand[2]);
// We now check if the password match
- $sUser = str_replace(array('%20', '(a)'), array(' ', '@'), $aCommand[1]);
+ $sUser = str_replace(['%20', '(a)'], [' ', '@'], $aCommand[1]);
// Does the hostname match? So we try directly
if ($a->get_hostname() == $aCommand[2]) {
$this->writeLog(LOG_INFO, 'internal auth for ' . $sUser . '@' . $aCommand[2]);
- $aUser = dba::selectOne('user', ['uid', 'password'], ['nickname' => $sUser]);
+ $aUser = dba::selectFirst('user', ['uid', 'password'], ['nickname' => $sUser]);
if (DBM::is_result($aUser)) {
$uid = $aUser['uid'];
$success = User::authenticate($aUser, $aCommand[3]);