diff options
author | Bart Visscher <bart@thisnet.nl> | 2011-09-18 19:37:54 +0200 |
---|---|---|
committer | Bart Visscher <bart@thisnet.nl> | 2011-09-18 19:37:54 +0200 |
commit | 82c7598861db175617694891bb9f21b426426225 (patch) | |
tree | fce8fb4717b4cc2a5dc6da8835bdb51b5fb40054 /apps/user_openid | |
parent | d5656716f69caa6a1eb98706994ffcb9a08553a7 (diff) | |
download | nextcloud-server-82c7598861db175617694891bb9f21b426426225.tar.gz nextcloud-server-82c7598861db175617694891bb9f21b426426225.zip |
Remove global vars and use the OC static version.
Removed global vars are DOCUMENTROOT, SERVERROOT, SUBURI, WEBROOT and CONFIG_DATADIRECTORY
Diffstat (limited to 'apps/user_openid')
-rw-r--r-- | apps/user_openid/appinfo/app.php | 3 | ||||
-rw-r--r-- | apps/user_openid/user.php | 3 | ||||
-rw-r--r-- | apps/user_openid/user_openid.php | 5 |
3 files changed, 4 insertions, 7 deletions
diff --git a/apps/user_openid/appinfo/app.php b/apps/user_openid/appinfo/app.php index e8e9fd2296b..578f8f4dade 100644 --- a/apps/user_openid/appinfo/app.php +++ b/apps/user_openid/appinfo/app.php @@ -32,13 +32,12 @@ if(isset($_GET['openid_mode']) and $_GET['openid_mode'] == 'id_res'){ $openid_validation_result = $openid->ValidateWithServer(); if ($openid_validation_result == true){ // OK HERE KEY IS VALID error_log('auth sucessfull'); - global $WEBROOT; $identity=$openid->GetIdentity(); error_log("auth as $identity"); $user=OC_USER_OPENID::findUserForIdentity($identity); if($user){ $_SESSION['user_id']=$user; - header("Location: $WEBROOT"); + header("Location: ".OC::$WEBROOT); } }else if($openid->IsError() == true){ // ON THE WAY, WE GOT SOME ERROR $error = $openid->GetError(); diff --git a/apps/user_openid/user.php b/apps/user_openid/user.php index 52fa1047344..60e12ed88e0 100644 --- a/apps/user_openid/user.php +++ b/apps/user_openid/user.php @@ -42,10 +42,9 @@ if(!OC_User::userExists($USERNAME)){ error_log($USERNAME.' doesn\'t exist'); $USERNAME=''; } -global $WEBROOT; $IDENTITY=OC_Helper::linkTo( "user_openid", "user.php", null, true ).'/'.$USERNAME; require_once 'phpmyid.php'; -?>
\ No newline at end of file +?> diff --git a/apps/user_openid/user_openid.php b/apps/user_openid/user_openid.php index d9af94dcafa..df050e908de 100644 --- a/apps/user_openid/user_openid.php +++ b/apps/user_openid/user_openid.php @@ -36,13 +36,12 @@ class OC_USER_OPENID extends OC_User_Backend { * Check if the password is correct without logging in the user */ public function checkPassword( $uid, $password ){ - global $WEBROOT; // Get identity from user and redirect browser to OpenID Server $openid = new SimpleOpenID; $openid->SetIdentity($uid); $openid->SetTrustRoot('http://' . $_SERVER["HTTP_HOST"]); if ($openid->GetOpenIDServer()){ - $openid->SetApprovedURL('http://' . $_SERVER["HTTP_HOST"] . $WEBROOT); // Send Response from OpenID server to this script + $openid->SetApprovedURL('http://' . $_SERVER["HTTP_HOST"] . OC::$WEBROOT); // Send Response from OpenID server to this script $openid->Redirect(); // This will redirect user to OpenID Server exit; }else{ @@ -67,4 +66,4 @@ class OC_USER_OPENID extends OC_User_Backend { -?>
\ No newline at end of file +?> |