Пример #1
0
 public function getRoles(Rixxi\User\IUser $user)
 {
     $roles = array('user');
     foreach ($user->getRoles() as $role) {
         $roles[] = $role->name;
     }
     return array_unique($roles);
 }
Пример #2
0
 public function setPassword(IUser $user, $password)
 {
     $user->setPassword($this->calculateHash($password));
 }