Beispiel #1
0
 public function validate(UserInterface $user)
 {
     return $this->username === $user->name() && $this->password === $user->password();
 }
Beispiel #2
0
 /**
  * Delete a user
  * 
  * @param   UserInterface   $user
  * 
  * @return  boolean
  */
 public function deleteUser(UserInterface $user)
 {
     return $this->deleteById(array($user->id()));
 }
Beispiel #3
0
 /**
  * Remove user's roles
  * 
  * @param   UserInterface   $user
  * @param   array           $roles
  */
 public function removeUserRoles(UserInterface $user, array $roles)
 {
     $user->userRoles()->unlink($roles);
 }