Lines Matching full:user
17 * Create a new user
19 * If no password is provided, a password is auto generated. If the user can't be created
25 * @param string $user The user's login name
26 * @param string $name The user's full name
27 * @param string $mail The user's email address
28 * @param string[] $groups The groups the user should be in
29 * @param string $password The user's password, empty for autogeneration
30 * @param bool $notify Whether to send a notification email to the user
31 * @return bool Wether the user was successfully created
36 public function createUser($user, $name, $mail, $groups, $password = '', $notify = false) argument
52 $user = trim($auth->cleanUser($user));
56 if ($user === '') throw new RemoteException('empty or invalid user', 401);
57 if ($name === '') throw new RemoteException('empty or invalid user name', 402);
62 $password = auth_pwgen($user);
72 $ok = (bool)$auth->triggerUserMod('create', [$user, $password, $name, $mail, $groups]);
75 auth_sendPassword($user, $password);
83 * Remove a user
87 * @param string[] $user The login name of the user to delete
88 * @return bool wether the user was successfully deleted
92 public function deleteUser($user) argument
108 return (bool)$auth->triggerUserMod('delete', [[$user]]);