Fixed login redirect

This commit is contained in:
Latif Khalifa
2014-06-15 01:08:26 +02:00
parent f9c8a99358
commit 157ffde5b7
3 changed files with 5 additions and 18 deletions

0
htdocs/batch_process.php Normal file → Executable file
View File

View File

@@ -2,21 +2,4 @@
define("SITE_ROOT", realpath(dirname(__file__))); define("SITE_ROOT", realpath(dirname(__file__)));
require_once SITE_ROOT . "/lib/init.php"; require_once SITE_ROOT . "/lib/init.php";
http::redirectAbsolute( GoogleLogin::loginURL());
$google_gateway = Layout::getLoginGateway();
Layout::header();
?>
<p>Please use your <a href="<?php echo $google_gateway->getRequestURL(); ?>">Google Account</a> to login.</p>
<?php
Layout::footer();
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
* vim600: noet sw=4 ts=4 fdm=marker
* vim<600: noet sw=4 ts=4
*/

View File

@@ -20,6 +20,10 @@ if (!$user)
$user->email = $user_email; $user->email = $user_email;
$user->is_admin = 0; $user->is_admin = 0;
$user->is_allowed = 0; $user->is_allowed = 0;
if ($user->email == "ek@krug.dk" || $user->email == "shyotl@gmail.com")
{
$user->is_allowed = 1;
}
$user->login = $user_identity; $user->login = $user_identity;
if (!$user->save()) if (!$user->save())
{ {