Lines Matching refs:this

64         $this->cando['addUser'] = false;
65 $this->cando['delUser'] = false;
66 $this->cando['modLogin'] = false;
67 $this->cando['modPass'] = false;
68 $this->cando['modName'] = false;
69 $this->cando['modMail'] = false;
70 $this->cando['modGroups'] = false;
71 $this->cando['getUsers'] = false;
72 $this->cando['getUserCount'] = false;
73 $this->cando['getGroups'] = true;
74 $this->cando['external'] = true;
75 $this->cando['logout'] = true;
77 $this->success = $this->loadConfiguration();
79 if (!$this->success) {
80 msg($this->getLang('config_error'), -1);
89 $this->disconnectSmfDB();
90 $this->_cache = null;
108 if ($this->doLoginCookie()) {
113 $is_logged = $this->checkPass($user, $pass); // Try to login over DokuWiki login form
115 $is_logged = $this->doLoginSSI(); // Try to login over SMF SSI API
120 msg($this->getLang('login_error'), -1);
125 $USERINFO['name'] = $_SESSION[DOKU_COOKIE]['auth']['user'] = $this->_smf_user_username;
126 $USERINFO['mail'] = $_SESSION[DOKU_COOKIE]['auth']['mail'] = $this->_smf_user_email;
127 $USERINFO['grps'] = $_SESSION[DOKU_COOKIE]['auth']['grps'] = $this->_smf_user_groups;
156 $this->_smf_conf['path'] = rtrim(trim($this->getConf('smf_path')), '\/');
157 if (!file_exists($this->_smf_conf['path'] . '/SSI.php')) {
158 dbglog('SMF not found in path' . $this->_smf_conf['path']);
161 include_once($this->_smf_conf['path'] . '/SSI.php');
164 $this->_smf_conf['boardurl'] = $boardurl;
165 $this->_smf_conf['db_server'] = $db_server;
166 $this->_smf_conf['db_name'] = $db_name;
167 $this->_smf_conf['db_user'] = $db_user;
168 $this->_smf_conf['db_passwd'] = $db_passwd;
169 $this->_smf_conf['db_character_set'] = $db_character_set;
170 $this->_smf_conf['db_prefix'] = $db_prefix;
172 return (!empty($this->_smf_conf['boardurl']));
188 $this->_smf_user_id = $user_info['id'];
189 $this->_smf_user_username = $user_info['username'];
190 $this->_smf_user_email = $user_info['email'];
191 $this->getUserGroups();
225 if (!$this->_smf_db_link) {
226 $this->_smf_db_link = new mysqli(
227 $this->_smf_conf['db_server'], $this->_smf_conf['db_user'],
228 $this->_smf_conf['db_passwd'], $this->_smf_conf['db_name'],
229 (int)$this->_smf_conf['db_port']
232 if (!$this->_smf_db_link || $this->_smf_db_link->connect_error) {
235 if ($this->_smf_db_link) {
236 $error .= ' (' . $this->_smf_db_link->connect_errno . ')';
239 msg($this->getLang('database_error'), -1);
240 $this->_smf_db_link = null;
245 if ($this->_smf_conf['db_character_set'] == 'utf8') {
246 $this->_smf_db_link->set_charset('utf8');
249 return ($this->_smf_db_link && $this->_smf_db_link->ping());
257 if ($this->_smf_db_link !== null) {
258 $this->_smf_db_link->close();
259 $this->_smf_db_link = null;
271 if (!$this->connectSmfDB() || !$this->_smf_user_id) {
276 FROM {$this->_smf_conf['db_prefix']}members m
277 …LEFT JOIN {$this->_smf_conf['db_prefix']}membergroups mg ON mg.id_group = m.id_group OR FIND_IN_SE…
278 WHERE m.id_member = {$this->_smf_user_id}";
280 $result = $this->_smf_db_link->query($query);
283 dbglog("cannot get groups for user id: {$this->_smf_user_id}");
289 $this->_smf_user_groups[] = 'admin'; // Map SMF Admin to DokuWiki Admin
291 $this->_smf_user_groups[] = $row->group_name;
295 if (!$this->_smf_user_is_banned) {
296 $this->_smf_user_groups[] = 'user';
298 $this->_smf_user_groups = array_unique($this->_smf_user_groups);
335 $this->_cache_duration = (int)($this->getConf('smf_cache'));
336 $depends = array('age' => self::CACHE_DURATION_UNIT * $this->_cache_duration);
337 $cache = new cache('authsmf20_getUserData_' . $user, $this->_cache_ext_name);
340 if (($this->_cache_duration > 0) && $cache->useCache($depends)) {
346 if (!$this->connectSmfDB()) {
350 $user = $this->_smf_db_link->real_escape_string($user);
353 FROM {$this->_smf_conf['db_prefix']}members m
354 …LEFT JOIN {$this->_smf_conf['db_prefix']}attachments a ON a.id_member = m.id_member AND a.id_msg =…
357 $result = $this->_smf_db_link->query($query);
366 $this->_smf_user_id = $row->id_member;
367 $this->getUserGroups();
369 $user_data['smf_user_groups'] = array_unique($this->_smf_user_groups);
391 …$user_data['smf_user_profile'] = $this->_smf_conf['boardurl'] . '/index.php?action=profile;u=' . $
392 $user_data['smf_user_avatar'] = $this->getAvatarUrl($row->avatar);
414 if (!$this->connectSmfDB()) {
419 FROM {$this->_smf_conf['db_prefix']}membergroups
422 $result = $this->_smf_db_link->query($query);
458 $this->_smf_user_id = $user_data['id'];
459 $this->_smf_user_username = $user_data['username'];
460 $this->_smf_user_email = $user_data['email'];
461 $this->getUserGroups();
492 …return $this->_smf_conf['boardurl'] . '/index.php?action=dlattach;attach=' . $avatar . ';type=avat…
498 return $this->_smf_conf['boardurl'] . '/avatars/' . $avatar;