Changeset 26626 for extensions/oAuth/main.inc.php
- Timestamp:
- Jan 11, 2014, 3:50:26 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/oAuth/main.inc.php
r26619 r26626 66 66 function oauth_init() 67 67 { 68 global $conf, $page, $hybridauth_conf ;68 global $conf, $page, $hybridauth_conf, $template; 69 69 70 70 include_once(OAUTH_PATH . 'maintain.inc.php'); … … 90 90 91 91 // in case of registration aborded 92 // DON'T WORK, because potentially executed by sub-scripts like Secureimage for Crypto Captcha 93 // if ( script_basename() != 'register' and ($data=pwg_get_session_var('oauth_new_user')) !== null ) 94 // { 95 // pwg_unset_session_var('oauth_new_user'); 92 if ( script_basename() == 'index' and ($oauth_id=pwg_get_session_var('oauth_new_user')) !== null ) 93 { 94 pwg_unset_session_var('oauth_new_user'); 96 95 97 // require_once(OAUTH_PATH . 'include/hybridauth/Hybrid/Auth.php'); 98 99 // try { 100 // $hybridauth = new Hybrid_Auth($hybridauth_conf); 101 // $adapter = $hybridauth->getAdapter($data[0]); 102 // $adapter->logout(); 103 // } 104 // catch (Exception $e) { 105 // } 106 // } 96 if ($oauth_id[0] == 'Persona') 97 { 98 oauth_assign_template_vars(get_gallery_home_url()); 99 $template->block_footer_script(null, 'navigator.id.logout();'); 100 } 101 else 102 { 103 require_once(OAUTH_PATH . 'include/hybridauth/Hybrid/Auth.php'); 104 105 try { 106 $hybridauth = new Hybrid_Auth($hybridauth_conf); 107 $adapter = $hybridauth->getAdapter($oauth_id[0]); 108 $adapter->logout(); 109 } 110 catch (Exception $e) {} 111 } 112 } 107 113 }
Note: See TracChangeset
for help on using the changeset viewer.