I have the following function. It checks if a User exists, authenticates
that user based on the provided Password and Username, updates the last
login info, and then returns a filepath to direct the user to.
function login($aArgs) {
if( !$this->_authenticate( $aArgs) ) {
catchErr("Can't authenticate User");
return FALSE;
}
$sql = " SELECT
app.admin_app_p ath
FROM
".PREFIX."_admi n_apps app,
".PREFIX."_admi n_perms perm
WHERE
app.admin_app_i d=perm.admin_ap p_id AND
perm.admin_user _id=".$this->_iUserId." AND
perm.admin_perm > 0
ORDER BY
app.admin_app_i d
LIMIT 0, 1";
if( DB::isError($sP ath = $this->_oConn->query($sql)) ) {
catchExc($sPath->getMessage() );
return FALSE;
}
if( empty($sPath) ) {
catchErr("No acceptable application permissions");
return FALSE;
}
$this->_updateLogin() ;
return $sPath;
}
my problem is the following. the returned $sPath var doesn't contain the
path, but merely a string saying "Object".
any ideas on this?
thanks a lot in advance,
Bernhard
that user based on the provided Password and Username, updates the last
login info, and then returns a filepath to direct the user to.
function login($aArgs) {
if( !$this->_authenticate( $aArgs) ) {
catchErr("Can't authenticate User");
return FALSE;
}
$sql = " SELECT
app.admin_app_p ath
FROM
".PREFIX."_admi n_apps app,
".PREFIX."_admi n_perms perm
WHERE
app.admin_app_i d=perm.admin_ap p_id AND
perm.admin_user _id=".$this->_iUserId." AND
perm.admin_perm > 0
ORDER BY
app.admin_app_i d
LIMIT 0, 1";
if( DB::isError($sP ath = $this->_oConn->query($sql)) ) {
catchExc($sPath->getMessage() );
return FALSE;
}
if( empty($sPath) ) {
catchErr("No acceptable application permissions");
return FALSE;
}
$this->_updateLogin() ;
return $sPath;
}
my problem is the following. the returned $sPath var doesn't contain the
path, but merely a string saying "Object".
any ideas on this?
thanks a lot in advance,
Bernhard
Comment