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