Skip to content
Snippets Groups Projects
Commit 0b87ace9 authored by Peter Rotich's avatar Peter Rotich
Browse files

Add ability to overwrite (pre-declare) client's login page function

parent 6154f1f6
No related branches found
No related tags found
No related merge requests found
......@@ -16,9 +16,18 @@
if(!strcasecmp(basename($_SERVER['SCRIPT_NAME']),basename(__FILE__))) die('Kwaheri!');
if(!file_exists('client.inc.php')) die('Fatal Error.');
require_once('client.inc.php');
//Client Login page: Ajax interface can pre-declare the function to trap logins.
if(!function_exists('clientLoginPage')) {
function clientLoginPage($msg ='') {
require('./login.php');
exit;
}
}
//User must be logged in!
if(!$thisclient || !$thisclient->getId() || !$thisclient->isValid()){
require('./login.php');
clientLoginPage();
exit;
}
$thisclient->refreshSession();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment