parent
a7af546078
commit
11f522d929
|
@ -39,23 +39,6 @@ class DbUserBackend extends UserBackend
|
|||
$this->conn = $conn;
|
||||
}
|
||||
|
||||
/**
|
||||
* Test whether the given user exists
|
||||
*
|
||||
* @param User $user
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function hasUser(User $user)
|
||||
{
|
||||
$select = new Zend_Db_Select($this->conn->getDbAdapter());
|
||||
$row = $select->from('icingaweb_user', array(new Zend_Db_Expr(1)))
|
||||
->where('name = ?', $user->getUsername())
|
||||
->query()->fetchObject();
|
||||
|
||||
return ($row !== false) ? true : false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a new user
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue