Lines Matching refs:this

40         $this->defaultgroup = $conf['defaultgroup'];
42 $this->simplesaml_path = $plugin_conf['simplesaml_path'];
43 $this->simplesaml_authsource = $plugin_conf['simplesaml_authsource'];
44 $this->simplesaml_uid = $plugin_conf['simplesaml_uid'];
45 $this->simplesaml_mail = $plugin_conf['simplesaml_mail'];
46 $this->simplesaml_name = $plugin_conf['simplesaml_name'];
47 $this->simplesaml_grps = $plugin_conf['simplesaml_grps'];
53 … $this->use_internal_user_store = !$auth_saml_active && $plugin_conf['use_internal_user_store'];
58 $this->saml_user_file = $conf['savedir'] . '/users.saml.php';
66 if ($this->ssp == null) {
67 include_once($this->simplesaml_path.'/lib/_autoload.php');
68 $this->ssp = new SimpleSAML_Auth_Simple($this->simplesaml_authsource);
70 return $this->ssp;
79 if ($this->use_internal_user_store) {
84 return $this->getFILEUserData($user);
89 $ssp = $this->get_ssp_instance();
91 if ($user == $this->getUsername()) {
100 if ($this->ssp->isAuthenticated()) {
101 $this->ssp->logout();
103 if ($this->use_internal_user_store) {
110 $attributes = $this->ssp->getAttributes();
111 return $attributes[$this->simplesaml_uid][0];
122 $this->attributes = $this->ssp->getAttributes();
124 if (!empty($this->attributes)) {
125 if (!array_key_exists($this->simplesaml_name , $this->attributes)) {
128 $name = $this->attributes[$this->simplesaml_name][0];
131 if (!array_key_exists($this->simplesaml_mail , $this->attributes)) {
134 $mail = $this->attributes[$this->simplesaml_mail][0];
137 if (!array_key_exists($this->simplesaml_grps, $this->attributes) ||
138 empty($this->attributes[$this->simplesaml_grps])) {
141 $grps = $this->attributes[$this->simplesaml_grps];
160 if($this->users === null) $this->_loadUserData();
161 return isset($this->users[$user]) ? $this->users[$user] : false;
168 $ssp = $this->get_ssp_instance();
169 $this->attributes = $ssp->getAttributes();
172 if ($ssp->isAuthenticated() && !empty($this->attributes)) {
176 $userData = $this->getUserData($username);
205 $userData = $this->getSAMLUserData();
207 if ($this->use_internal_user_store) {
211 $userData['grps'] = array($this->defaultgroup);
220 return $this->_saveUserData($username, $userData);
228 $userData = $this->getSAMLUserData();
247 if ($this->use_internal_user_store) {
251 $this->modifyUser($username, $changes);
257 if ($this->use_internal_user_store) {
262 return $this->deleteUsers($users);
276 $this->users = array();
278 if(!@file_exists($this->saml_user_file))
281 $lines = file($this->saml_user_file);
290 $this->users[$row[0]]['name'] = urldecode($row[1]);
291 $this->users[$row[0]]['mail'] = $row[2];
292 $this->users[$row[0]]['grps'] = $groups;
309 if (!io_deleteFromFile($this->saml_user_file, $pattern, true)) {
320 if (!io_saveFile($this->saml_user_file, $userline, true)) {
324 $this->users[$username] = $userinfo;
332 if($this->users === null) $this->_loadUserData();
336 if(isset($this->users[$user])) $deleted[] = preg_quote($user, '/');
343 if(io_deleteFromFile($this->saml_user_file, $pattern, true)) {
344 foreach($deleted as $user) unset($this->users[$user]);
349 $count = count($this->users);
350 $this->_loadUserData();
351 $count -= count($this->users);
359 if(($userinfo = $this->getFILEUserData($username)) === false) return false;
377 if(!$this->deleteUsers(array($username))) {
382 if(!io_saveFile($this->saml_user_file, $userline, true)) {
389 $this->users[$newuser] = $userinfo;