Add php files
This commit is contained in:
24
modules/Users/googleLogin.php
Executable file
24
modules/Users/googleLogin.php
Executable file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
echo "<pre>";
|
||||
include_once 'include/ECM/EcmGoogleServices/EcmGoogleService.php';
|
||||
|
||||
if($_GET['logout']==1){
|
||||
unset($_SESSION['access_token']);
|
||||
header("Location: index.php?module=Home&action=index");
|
||||
}
|
||||
if($_GET['error']=='access_denied'){
|
||||
unset($_SESSION['access_token']);
|
||||
header("Location: index.php?module=Home&action=index");
|
||||
}
|
||||
$go=new EcmGoogleService();
|
||||
if($go!=false){
|
||||
if($go->checkLogin()==false){
|
||||
if($go->logIn($_GET['code'])==true){
|
||||
header("Location: index.php?module=Home&action=index");
|
||||
}
|
||||
} else {
|
||||
header("Location: index.php?module=Home&action=index");
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user