public function getRoles(Rixxi\User\IUser $user) { $roles = array('user'); foreach ($user->getRoles() as $role) { $roles[] = $role->name; } return array_unique($roles); }
public function setPassword(IUser $user, $password) { $user->setPassword($this->calculateHash($password)); }