Fixed login redirect

This commit is contained in:
Latif Khalifa
2014-06-15 01:08:26 +02:00
committed by Singularity Viewer
parent 25939cc553
commit 980321b73f
2 changed files with 5 additions and 18 deletions

View File

@@ -2,21 +2,4 @@
define("SITE_ROOT", realpath(dirname(__file__)));
require_once SITE_ROOT . "/lib/init.php";
$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
*/
http::redirectAbsolute( GoogleLogin::loginURL());

View File

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