/** * @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; }
/** * @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; }