Lines Matching refs:this

35    $this->_debug("MySQL err: PHP MySQL extension not found.", -1, __LINE__, __FILE__);
36 $this->success = false;
40 if(!$this->getConf('database') || !$this->getConf('username') || !$this->getConf('host')) {
41 $this->_debug("MySQL err: insufficient configuration.", -1, __LINE__, __FILE__);
42 $this->success = false;
46 $this->cando['addUser'] = false; // can Users be created?
47 $this->cando['delUser'] = false; // can Users be deleted?
48 $this->cando['modLogin'] = false; // can login names be changed?
49 $this->cando['modPass'] = false; // can passwords be changed?
50 $this->cando['modName'] = false; // can real names be changed?
51 $this->cando['modMail'] = false; // can emails be changed?
52 $this->cando['modGroups'] = false; // can groups be changed?
53 $this->cando['getUsers'] = false; // FIXME can a (filtered) list of users be retrieved?
54 $this->cando['getUserCount'] = true; // can the number of users be retrieved?
55 $this->cando['getGroups'] = false; // FIXME can a list of available groups be retrieved?
56 $this->cando['external'] = false; // does the module do external auth checking?
57 $this->cando['logout'] = true; // can the user logout again? (eg. not possible with HTTP auth)
59 $this->success = true;
79 if($this->_openDB()) {
80 $sql = str_replace('%{user}', $this->_escape($user), $this->checkPass);
81 $sql = str_replace('%{drupalPrefix}', $this->getConf('prefix'), $sql);
82 $result = $this->_queryDB($sql);
84 $rc = $this->_hash_password($pass, $result[0]['pass']) == $result[0]['pass'];
86 $this->_closeDB();
104 $this->success = false;
122 if($this->_cacheExists($user, $requireGroups)) {
123 return $this->cacheUserInfo[$user];
125 if($this->_openDB()) {
126 $this->_lockTables("READ");
127 $info = $this->_getUserInfo($user, $requireGroups);
128 $this->_unlockTables();
129 $this->_closeDB();
139 * The database connection must already be established for this function to work.
152 if ($useCache && isset($this->cacheUserInfo[$user])) {
153 $info = $this->cacheUserInfo[$user];
156 $info = $this->_retrieveUserInfo($user);
159 $info['grps'] = $this->_getGroups($user);
162 $this->cacheUserInfo[$user] = $info;
171 * must already be established for this function to work.
181 $sql = str_replace('%{user}', $this->_escape($user), $this->getUserInfo);
182 $sql = str_replace('%{drupalPrefix}', $this->getConf('prefix'), $sql);
183 $result = $this->_queryDB($sql);
195 * for this function to work. Otherwise it will return
206 if($this->dbcon) {
207 $sql = str_replace('%{user}', $this->_escape($user), $this->getGroups);
208 $sql = str_replace('%{drupalPrefix}', $this->getConf('prefix'), $sql);
209 $result = $this->_queryDB($sql);
231 if($this->_openDB()) {
232 $sql = str_replace('%{drupalPrefix}', $this->getConf('prefix'), $this->getUserCount);
233 $result = $this->_queryDB($sql);
235 $this->_closeDB();
275 * To accommodate for this, the user manager plugin will touch a reference
277 * of this reference file with the time stored in the session.
295 * usage in the object. The successful call to this functions is
296 * essential for most functions in this object.
303 if(!$this->dbcon) {
304 $con = @mysqli_connect($this->getConf('host'), $this->getConf('username'), $this->getConf('password'));
306 if((mysqli_select_db($con, $this->getConf('database')))) {
308 $this->dbver = $result[1];
309 $this->dbrev = $result[2];
310 $this->dbsub = $result[3];
312 $this->dbcon = $con;
313 if($this->getConf('charset')) {
319 $this->_debug("MySQL err: No access to database {$this->getConf('database')}.", -1, __LINE__, __FILE__);
322 $this->_debug(
323 "MySQL err: Connection to {$this->getConf('username')}@{$this->getConf('host')} not possible.",
338 if($this->dbcon) {
339 mysqli_close($this->dbcon);
340 $this->dbcon = 0;
357 if($this->getConf('debug') >= 2) {
361 if($this->dbcon) {
362 $result = @mysqli_query($this->dbcon, $query);
369 $this->_debug('MySQL err: '.mysqli_error($this->dbcon), -1, __LINE__, __FILE__);
384 if($this->dbcon) {
385 $string = mysqli_real_escape_string($this->dbcon, $string);
405 if(!$this->getConf('debug')) return;
421 if($this->getConf('debug') >= 2) {
424 if($this->dbcon) {
425 $result = @mysqli_query($this->dbcon, $query);
427 $rc = mysqli_insert_id($this->dbcon); //give back ID on insert
430 $this->_debug('MySQL err: '.mysqli_error($this->dbcon), -1, __LINE__, __FILE__);
440 * If aliases for tables are used in SQL statements, also this aliases
442 * some sql queries, the array must looks like this (order is important):
446 * so that this functionality is simulated by this function. Nevertheless
455 if($this->dbcon) {
456 $ttl = $this->$TablesToLock;
465 $this->_modifyDB($sql);
473 * Unlock locked tables. All existing locks of this thread will be
481 if($this->dbcon) {
482 $this->_modifyDB("UNLOCK TABLES");
498 $this->cacheUserInfo = array();
500 unset($this->cacheUserInfo[$user]);
517 if (isset($this->cacheUserInfo[$user])) {
518 if (!is_array($this->cacheUserInfo[$user])) {
521 if (!$requireGroups || isset($this->cacheUserInfo[$user]['grps'])) {