Lines Matching defs:user

31     /** @var array cached user info */
62 $defaults['defaultgroup'] = 'user'; // we expect this to be passed from global conf
86 * Extract user info from environment for SSO
95 $user = $INPUT->server->str('REMOTE_USER');
100 $user = iconv($this->config['sso_charset'], 'UTF-8', $user);
102 $user = mb_convert_encoding($user, 'UTF-8', $this->config['sso_charset']);
104 } elseif (!Clean::isUtf8($user)) {
105 $user = utf8_encode($user);
107 $user = $this->cleanUser($user);
111 // trust the incoming user
112 $INPUT->server->set('REMOTE_USER', $user);
116 $INPUT->set('u', $user);
143 $user = $this->prepareBindUser($this->config['admin_username']);
144 $ok = $this->authenticate($user, $this->config['admin_password']);
146 $this->error('Automatic bind failed. Probably wrong user/password.', __FILE__, __LINE__);
152 * Authenticates a given user. This client will remain authenticated
154 * @param string $user
159 public function authenticate($user, $pass)
161 $user = $this->prepareBindUser($user);
174 $this->ldap->bind($user, $pass);
176 $this->debug("Bind for $user failed: " . $e->getMessage(), $e->getFile(), $e->getLine());
183 $this->isAuthenticated = $user;
188 * Get info for a single user, use cache if available
207 $cachename = getCacheName($username, '.pureldap-user');
236 * Fetch a single user
245 * Set a new password for a user
280 * Clean the user name for use in DokuWiki
282 * @param string $user
285 abstract public function cleanUser($user);
296 * Inheriting classes may want to manipulate the user before binding
298 * @param string $user
301 protected function prepareBindUser($user)
303 return $user;
323 * Get the attributes that should be fetched for a user