00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00050 require_once(PATH_t3lib.'class.t3lib_svbase.php');
00051
00052
00053
00054
00062 class tx_sv_authbase extends t3lib_svbase {
00063
00064 var $pObj;
00065
00066 var $mode;
00067
00068 var $login = array();
00069 var $authInfo = array();
00070
00071 var $db_user = array();
00072 var $db_groups = array();
00073
00074 var $writeAttemptLog = false;
00075 var $writeDevLog = false;
00076
00077
00087 function initAuth($mode, $loginData, $authInfo, &$pObj) {
00088
00089 $this->pObj = &$pObj;
00090
00091 $this->mode = $mode;
00092 $this->login = $loginData;
00093 $this->authInfo = $authInfo;
00094
00095 $this->db_user = $this->getServiceOption('db_user', $authInfo['db_user'], FALSE);
00096 $this->db_groups = $this->getServiceOption('db_groups', $authInfo['db_groups'], FALSE);
00097
00098 $this->writeAttemptLog = $this->pObj->writeAttemptLog;
00099 $this->writeDevLog = $this->pObj->writeDevLog;
00100 }
00101
00110 function compareUident($user, $loginData, $security_level='') {
00111 return $this->pObj->compareUident($user, $loginData, $security_level);
00112 }
00113
00129 function writelog($type,$action,$error,$details_nr,$details,$data,$tablename='',$recuid='',$recpid='') {
00130 if($this->writeAttemptLog) {
00131 $this->pObj->writelog($type,$action,$error,$details_nr,$details,$data,$tablename,$recuid,$recpid);
00132 }
00133 }
00134
00135
00136
00137
00138
00139
00140
00141
00142
00143
00144
00145
00146
00147
00148
00149
00158 function fetchUserRecord($username, $extraWhere='', $dbUserSetup='') {
00159
00160 $dbUser = is_array($dbUserSetup) ? $dbUserSetup : $this->db_user;
00161 $user = $this->pObj->fetchUserRecord($dbUser, $username, $extraWhere);
00162
00163 return $user;
00164 }
00165 }
00166
00167 ?>