Ignore:
Timestamp:
Jan 11, 2014, 3:50:26 PM (11 years ago)
Author:
mistic100
Message:

add 'allow_merge_accounts' parameter

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/oAuth/main.inc.php

    r26619 r26626  
    6666function oauth_init()
    6767{
    68   global $conf, $page, $hybridauth_conf;
     68  global $conf, $page, $hybridauth_conf, $template;
    6969 
    7070  include_once(OAUTH_PATH . 'maintain.inc.php');
     
    9090 
    9191  // 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');
    9695   
    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  }
    107113}
Note: See TracChangeset for help on using the changeset viewer.