Esempio n. 1
0
 /**
  * @param $name
  * @param $passwd
  * @param $email
  * @return User
  */
 public function addUser($name, $passwd, $email)
 {
     $user = new User();
     $user->setUsername($name);
     $user->setEmail($email);
     $user->setPlainPassword($passwd);
     $user->setEnabled(true);
     return $user;
 }
Esempio n. 2
0
 /**
  * @param Group $group
  * @return User
  */
 public function createAdminUser($group)
 {
     $user = new User();
     $user->setUsername('admin');
     $user->setEmail('*****@*****.**');
     $user->setPlainPassword('admin');
     $user->setEnabled(true);
     $user->addGroup($group);
     return $user;
 }