Lines Matching refs:this

37         $this->cando['addUser']     = false; // can Users be created?
38 $this->cando['delUser'] = false; // can Users be deleted?
39 $this->cando['modLogin'] = false; // can login names be changed?
40 $this->cando['modPass'] = false; // can passwords be changed?
41 $this->cando['modName'] = false; // can real names be changed?
42 $this->cando['modMail'] = false; // can emails be changed?
43 $this->cando['modGroups'] = false; // can groups be changed?
44 $this->cando['getUsers'] = false; // can a (filtered) list of users be retrieved?
45 $this->cando['getUserCount']= false; // can the number of users be retrieved?
46 $this->cando['getGroups'] = false; // can a list of available groups be retrieved?
47 $this->cando['external'] = false; // does the module do external auth checking?
48 …$this->cando['logout'] = true; // can the user logout again? (eg. not possible with HTTP aut…
51 $this->db_dsn = $this->getConf( 'databaseDSN' );
52 $this->db_user = $this->getConf( 'databaseUser' );
53 $this->db_passwd = $this->getConf( 'databasePassword' );
56 $this->success = true;
87 $entity = $this->_findUser( $user );
89 return $this->_checkUserPassword( $entity, $pass );
91 $entity = $this->_findAdmin( $user );
93 return $this->_checkAdminPassword( $entity, $pass );
114 $entity = $this->_findUser( $user );
116 $name = "{$this->users[$entity]['first']} {$this->users[$entity]['last']}";
118 if ( ! isset( $this->users[$entity]['mail']) ) $this->_loadMailAddress( $entity );
120 if ( ! isset( $this->users[$entity]['groups']) ) $this->_loadUserGroups( $entity );
123 $groups = $this->users[$entity]['groups'];
125 if ( $this->getConf( 'includeDefaultGroup' ) == 1 ) {
129 if ( $this->getConf( 'userGroups' ) ) {
130 … $usergroups = array_values( array_filter( explode( ",", $this->getConf( 'userGroups' ) ) ) );
136 $data['mail'] = $this->users[$entity]['mail'];
140 $entity = $this->_findAdmin( $user );
142 if ( ! isset( $this->admins[$entity]['roles']) ) $this->_loadAdminRoles( $entity );
145 $groups = $this->admins[$entity]['roles'];
147 if ( $this->getConf( 'includeDefaultGroup' ) == 1 ) {
151 if ( $this->getConf( 'adminGroups' ) ) {
152 … $usergroups = array_values( array_filter( explode( ",", $this->getConf( 'adminGroups' ) ) ) );
157 $data['name'] = "{$this->admins[$entity]['first']} {$this->admins[$entity]['last']}";
158 $data['mail'] = $this->admins[$entity]['mail'];
284 return cleanID( str_replace( ':', $this->getConf['sepchar'], $user ) );
302 return cleanID( str_replace(':', $this->getConf['sepchar'], $group ) );
348 if( $this->users === null ) $this->_loadUserData();
350 $sep = $this->getConf['sepchar'];
354 foreach( $this->users as $entry ) {
384 …$dbh = new PDO( $this->db_dsn, $this->db_user, $this->db_passwd, array( PDO::ATTR_PERSISTENT => tr…
397 return $this->validateHash( $pass, $hash );
399 if ( $this->getConf( 'debugDatabase' ) == 1 ) {
417 if( $this->admins === null ) $this->_loadAdminData();
419 foreach( $this->admins as $entry ) {
438 …$dbh = new PDO( $this->db_dsn, $this->db_user, $this->db_passwd, array( PDO::ATTR_PERSISTENT => tr…
451 return $this->validateHash( $pass, $hash );
453 if ( $this->getConf( 'debugDatabase' ) == 1 ) {
484 return $this->hash($password) === $hash;
486 return $this->hash($hashArr[1] . $password) === $hashArr[0];
498 $this->users = array();
500 if ( $this->getConf( 'includeCustomers' ) != 1 ) return true;
504 …$dbh = new PDO( $this->db_dsn, $this->db_user, $this->db_passwd, array( PDO::ATTR_PERSISTENT => tr…
510 $this->users[$row['entity']]['entity'] = $row['entity'];
511 $this->users[$row['entity']]['first'] = $row['first'];
512 $this->users[$row['entity']]['last'] = $row['last'];
517 if ( $this->getConf( 'debugDatabase' ) == 1 ) {
530 $this->users[$entity]['mail'] = "default";
534 …$dbh = new PDO( $this->db_dsn, $this->db_user, $this->db_passwd, array( PDO::ATTR_PERSISTENT => tr…
541 $this->users[$entity]['mail'] = $row['mail'];
547 if ( $this->getConf( 'debugDatabase' ) == 1 ) {
560 $this->users[$entity]['groups'] = array();
562 if ( $this->getConf( 'includeGroups' ) != 1 ) return true;
566 …$dbh = new PDO( $this->db_dsn, $this->db_user, $this->db_passwd, array( PDO::ATTR_PERSISTENT => tr…
574 $this->users[$entity]['groups'] = array( $name );
580 if ( $this->getConf( 'debugDatabase' ) == 1 ) {
593 $this->admins = array();
595 if ( $this->getConf( 'includeAdmins' ) != 1 ) return true;
599 …$dbh = new PDO( $this->db_dsn, $this->db_user, $this->db_passwd, array( PDO::ATTR_PERSISTENT => tr…
605 $this->admins[$row['entity']]['entity'] = $row['entity'];
606 $this->admins[$row['entity']]['user'] = $row['user'];
607 $this->admins[$row['entity']]['first'] = $row['first'];
608 $this->admins[$row['entity']]['last'] = $row['last'];
609 $this->admins[$row['entity']]['mail'] = $row['mail'];
614 if ( $this->getConf( 'debugDatabase' ) == 1 ) {
627 $this->admins[$entity]['roles'] = array();
629 if ( $this->getConf( 'includeRoles' ) != 1 ) return true;
631 if( $this->roles === null ) $this->_loadRoles();
636 …$dbh = new PDO( $this->db_dsn, $this->db_user, $this->db_passwd, array( PDO::ATTR_PERSISTENT => tr…
649 $name = $this->roles[$item[0]]['name'];
652 array_push( $this->admins[$entity]['roles'] , $name );
670 if ( $this->getConf( 'debugDatabase' ) == 1 ) {
683 $this->roles = array();
687 …$dbh = new PDO( $this->db_dsn, $this->db_user, $this->db_passwd, array( PDO::ATTR_PERSISTENT => tr…
693 $this->roles[$row['id']]['id'] = $row['id'];
694 $this->roles[$row['id']]['name'] = $row['name'];
699 if ( $this->getConf( 'debugDatabase' ) == 1 ) {