Lines Matching refs:user

88            auth plugin as otherwise admins can not add user accounts there in
95 /* To add and delete user accounts, modify real names, email addresses,
122 'getUsers' => 'get user list',
123 'getUserCount' => 'get user counts',
136 * Authenticate user (DokuWiki-style user/password authentication)
139 * used (primary auth plugin's canDo['external'] == false) and the user
142 * @param string $user the user name
146 public function checkPass($user, $pass) {
148 if (!$this->authplugins['primary']->checkPass($user, $pass)) {
157 'user successfully.', 1, __LINE__, __FILE__
161 user. */
162 return $this->_checkUserOnSecondaryAuthPlugin($user);
166 * Authenticate user (external authentication)
171 * @param string $user The user name (may be empty)
176 public function trustExternal($user, $pass, $sticky = false) {
180 validate the user (by means of a password, a cookie or whatever). */
181 if (!$this->authplugins['primary']->trustExternal($user, $pass, $sticky)) {
189 /* As $user may be empty (eg. when authentication is done via a cookie)
191 $user = $_SERVER['REMOTE_USER'];
193 'authsplit:trustExternal(): derived user name: ' . $user,
198 user. */
199 if ($this->_checkUserOnSecondaryAuthPlugin($user)) {
202 $USERINFO = $this->getUserData($user, true);
209 * Ensures that the user is known to the secondary auth plugin as well.
211 * @param string $user the user name
214 public function _checkUserOnSecondaryAuthPlugin($user) {
216 $userinfo = $this->authplugins['secondary']->getUserData($user, false);
222 'getUserData() failed, seems user is yet unknown there.', -1,
233 /* Make sure automatic user creation is enabled */
237 /* Make sure the secondary auth plugin can create user accounts */
250 method, we use the primary auth plugin's data to create a user
252 $params = $this->authplugins['primary']->getUserData($user, true);
269 /* Create the new user account */
273 $user, $pass,
295 * Logoff the user (useful for external authentication)
297 * @param string $user the user name
306 * Log the user In (useful for external authentication)
315 * Return user info
317 * Returned info about the given user needs to contain
320 * name string full name of the user
321 * mail string email address of the user
322 * grps array list of groups the user is in
324 * @param string $user the user name
325 * @param bool $requireGroups whether to return user's groups as well
326 * @return array containing user data or false
328 public function getUserData($user, $requireGroups = true) {
329 /* A user must be present in BOTH auth plugins. */
330 $userinfo = $this->authplugins['primary']->getUserData($user, false);
334 'failed, seems user is yet unknown there.', 1,
340 $userinfo = $this->authplugins['secondary']->getUserData($user, $requireGroups);
344 'failed, seems user is yet unknown there.', 1,
358 * Returns a string representation of user data for debugging purposes
360 * @param array $user An array with user data
363 protected function _dumpUserData($user) {
364 $msg = 'Name: "'.$user['name'].'", '.
365 'Mail: "'.$user['mail'].'", ' .
367 foreach ($user['grps'] as $grp) {
377 * Returns false if the user already exists, null when an error
380 * The new user HAS TO be added to the default group by this
385 * @param string $user
392 public function createUser($user, $pass, $name, $mail, $grps = null) {
393 /* Does the user not exist yet in the primary auth plugin and does it
395 $userinfo = $this->authplugins['primary']->getUserData($user, false);
398 $user, $pass, $name, $email
408 'authsplit:createUser(): user created in primary auth plugin.',
413 /* We need to create the user in the secondary auth plugin in any case. */
415 $user, '', $name, $mail, $grps
426 'authsplit:createUser(): user created in secondary auth plugin.',
434 * Modify user data
438 * @param string $user nick of the user to be changed
443 public function modifyUser($user, $changes) {
451 $user,
467 $user,
485 $user, array(
500 $user,
527 /* We do NOT attempt to delete the user with the primary auth plugin.
542 * Bulk retrieval of user data
546 * @param int $start index of first user to be returned
568 * Return a count of the number of user which meet $filter criteria
632 * user) then you need to overwrite this method and return false
650 * This function is applied to any user name that is given to
651 * the backend and should also be applied to any user name within
656 * @param string $user username
659 public function cleanUser($user) {
661 $result = $this->authplugins['primary']->cleanUser($user);
664 'cleanUser("'.$user.'"): "'.$result.'".', 1, __LINE__, __FILE__