Lines Matching refs:user

205  * @param   string  $user    Username
211 function auth_login($user, $pass, $sticky = false, $silent = false) { argument
224 if(!empty($user)) {
226 if(!empty($pass) && $auth->checkPass($user, $pass)) {
228 $INPUT->server->set('REMOTE_USER', $user);
230 auth_setCookie($user, auth_encrypt($pass, $secret), $sticky);
243 list($user, $sticky, $pass) = auth_getCookie();
244 if($user && $pass) {
251 $auth->useSessionCache($user) &&
253 ($session['user'] == $user) &&
259 $INPUT->server->set('REMOTE_USER', $user);
267 return auth_login($user, $pass, $sticky, true);
446 * @param string $user Username
455 function auth_ismanager($user = null, $groups = null, $adminonly = false, $recache=false) { argument
465 if(is_null($user)) {
469 $user = $INPUT->server->str('REMOTE_USER');
474 if ($USERINFO && $user === $INPUT->server->str('REMOTE_USER')) {
477 $groups = $auth->getUserData($user);
484 $cachekey = serialize([$user, $adminonly, $groups]);
487 $ok = auth_isMember($conf['superuser'], $user, $groups);
491 $ok = auth_isMember($conf['manager'], $user, $groups);
507 * @param string $user Username
515 function auth_isadmin($user = null, $groups = null, $recache=false) { argument
516 return auth_ismanager($user, $groups, true, $recache);
526 * @param string $user user to match against
530 function auth_isMember($memberlist, $user, array $groups) { argument
537 $user = \dokuwiki\Utf8\PhpString::strtolower($user);
540 $user = $auth->cleanUser($user);
558 if($member == $user) return true;
593 * @param string $user Username
597 function auth_aclcheck($id, $user, $groups) { argument
600 'user' => $user,
619 $user =& $data['user'];
635 if(auth_isadmin($user, $groups)) {
640 $user = \dokuwiki\Utf8\PhpString::strtolower($user);
643 $user = auth_nameencode($auth->cleanUser($user));
658 if($user) $groups[] = $user;
827 * @param string $user Login name of the user
831 function auth_sendPassword($user, $password) { argument
837 $user = $auth->cleanUser($user);
838 $userinfo = $auth->getUserData($user, $requireGroups = false);
845 'LOGIN' => $user,
1109 $user = io_readfile($tfile);
1110 $userinfo = $auth->getUserData($user, $requireGroups = false);
1127 if(!$auth->triggerUserMod('modify', array($user, array('pass' => $pass)))) {
1134 $pass = auth_pwgen($user);
1135 if(!$auth->triggerUserMod('modify', array($user, array('pass' => $pass)))) {
1140 if(auth_sendPassword($user, $pass)) {
1159 $user = trim($auth->cleanUser($INPUT->post->str('login')));
1162 $userinfo = $auth->getUserData($user, $requireGroups = false);
1173 io_saveFile($tfile, $user);
1178 'LOGIN' => $user,
1241 * @param string $user username
1246 function auth_setCookie($user, $pass, $sticky) { argument
1253 $USERINFO = $auth->getUserData($user);
1256 $cookie = base64_encode($user).'|'.((int) $sticky).'|'.base64_encode($pass);
1262 $_SESSION[DOKU_COOKIE]['auth']['user'] = $user;
1280 list($user, $sticky, $pass) = explode('|', $_COOKIE[DOKU_COOKIE], 3);
1283 $user = base64_decode($user);
1284 return array($user, $sticky, $pass);