Lines Matching refs:this

36             $this->_debug("MySQL err: PHP MySQL extension not found.", -1, __LINE__, __FILE__);
37 $this->success = false;
42 if(!$this->getConf('server') || !$this->getConf('user') || !$this->getConf('database')) {
43 $this->_debug("MySQL err: insufficient configuration.", -1, __LINE__, __FILE__);
44 $this->success = false;
49 $this->cando['addUser'] = false; // can Users be created?
50 $this->cando['delUser'] = false; // can Users be deleted?
51 $this->cando['modLogin'] = false; // can login names be changed?
52 $this->cando['modPass'] = false; // can passwords be changed?
53 $this->cando['modName'] = false; // can real names be changed?
54 $this->cando['modMail'] = false; // can emails be changed?
55 $this->cando['modGroups'] = false; // can groups be changed?
56 $this->cando['getUsers'] = false; // FIXME can a (filtered) list of users be retrieved?
57 $this->cando['getUserCount']= true; // can the number of users be retrieved?
58 $this->cando['getGroups'] = false; // FIXME can a list of available groups be retrieved?
59 $this->cando['external'] = false; // does the module do external auth checking?
60 …$this->cando['logout'] = true; // can the user logout again? (eg. not possible with HTTP auth)
63 $this->success = true;
83 if($this->_openDB()) {
84 $sql = str_replace('%{user}', $this->_escape($user), $this->getConf('checkPass'));
85 $sql = str_replace('%{drupal_prefix}', $this->getConf('drupalPrefix'), $sql);
86 $result = $this->_queryDB($sql);
88 $rc = $this->_hash_password($pass, $result[0]['pass']) == $result[0]['pass'];
90 $this->_closeDB();
105 $drupalroot = $this->getConf('drupalRoot');
109 $this->success = false;
127 if($this->_cacheExists($user, $requireGroups)) {
128 return $this->cacheUserInfo[$user];
130 if($this->_openDB()) {
131 $this->_lockTables("READ");
132 $info = $this->_getUserInfo($user, $requireGroups);
133 $this->_unlockTables();
134 $this->_closeDB();
157 if ($useCache && isset($this->cacheUserInfo[$user])) {
158 $info = $this->cacheUserInfo[$user];
161 $info = $this->_retrieveUserInfo($user);
164 $info['grps'] = $this->_getGroups($user);
167 $this->cacheUserInfo[$user] = $info;
186 $sql = str_replace('%{user}', $this->_escape($user), $this->getConf('getUserInfo'));
187 $sql = str_replace('%{drupal_prefix}', $this->getConf('drupalPrefix'), $sql);
188 $result = $this->_queryDB($sql);
211 if($this->dbcon) {
212 $sql = str_replace('%{user}', $this->_escape($user), $this->getConf('getGroups'));
213 $sql = str_replace('%{drupal_prefix}', $this->getConf('drupalPrefix'), $sql);
214 $result = $this->_queryDB($sql);
236 if($this->_openDB()) {
237 …$sql = str_replace('%{drupal_prefix}', $this->getConf('drupalPrefix'), $this->getConf('getUserCoun…
238 $result = $this->_queryDB($sql);
240 $this->_closeDB();
309 if(!$this->dbcon) {
310 …$con = @mysql_connect($this->getConf('server'), $this->getConf('user'), $this->getConf('password')…
312 if((mysql_select_db($this->getConf('database'), $con))) {
314 $this->dbver = $result[1];
315 $this->dbrev = $result[2];
316 $this->dbsub = $result[3];
318 $this->dbcon = $con;
319 if($this->getConf('charset')) {
320 mysql_query('SET CHARACTER SET "'.$this->getConf('charset').'"', $con);
325 …$this->_debug("MySQL err: No access to database {$this->getConf('database')}.", -1, __LINE__, __FI…
328 $this->_debug(
329 … "MySQL err: Connection to {$this->getConf('user')}@{$this->getConf('server')} not possible.",
344 if($this->dbcon) {
345 mysql_close($this->dbcon);
346 $this->dbcon = 0;
363 if($this->getConf('debug') >= 2) {
367 if($this->dbcon) {
368 $result = @mysql_query($query, $this->dbcon);
375 $this->_debug('MySQL err: '.mysql_error($this->dbcon), -1, __LINE__, __FILE__);
390 if($this->dbcon) {
391 $string = mysql_real_escape_string($string, $this->dbcon);
411 if(!$this->getConf('debug')) return;
427 if($this->getConf('debug') >= 2) {
430 if($this->dbcon) {
431 $result = @mysql_query($query, $this->dbcon);
433 $rc = mysql_insert_id($this->dbcon); //give back ID on insert
436 $this->_debug('MySQL err: '.mysql_error($this->dbcon), -1, __LINE__, __FILE__);
461 if($this->dbcon) {
462 $ttl = $this->getConf('TablesToLock');
471 $this->_modifyDB($sql);
487 if($this->dbcon) {
488 $this->_modifyDB("UNLOCK TABLES");
504 $this->cacheUserInfo = array();
506 unset($this->cacheUserInfo[$user]);
522 if (isset($this->cacheUserInfo[$user])) {
523 if (!is_array($this->cacheUserInfo[$user])) {
526 if (!$requireGroups || isset($this->cacheUserInfo[$user]['grps'])) {