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_path
FROM
".PREFIX."_admin_apps app,
".PREFIX."_admin_perms perm
WHERE
app.admin_app_id=perm.admin_app_id AND
perm.admin_user_id=".$this->_iUserId." AND
perm.admin_perm > 0
ORDER BY
app.admin_app_id
LIMIT 0, 1";
if( DB::isError($sPath = $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