autoUpdate(OAUTH_VERSION, 'install'); load_language('plugin.lang', OAUTH_PATH); $conf['oauth'] = unserialize($conf['oauth']); // check config if (defined('IN_ADMIN')) { if (empty($hybridauth_conf) and strpos(@$_GET['page'],'plugin-'.OAUTH_ID)===false) { $page['warnings'][] = ''.l10n('Social Connect: You need to configure the credentials').''; } if (!function_exists('curl_init')) { $page['warnings'][] = l10n('Social Connect: PHP Curl extension is needed'); } } // in case of registration aborded if ( script_basename() == 'index' and ($oauth_id=pwg_get_session_var('oauth_new_user')) !== null ) { pwg_unset_session_var('oauth_new_user'); if ($oauth_id[0] == 'Persona') { oauth_assign_template_vars(get_gallery_home_url()); $template->block_footer_script(null, 'navigator.id.logout();'); } else { require_once(OAUTH_PATH . 'include/hybridauth/Hybrid/Auth.php'); try { $hybridauth = new Hybrid_Auth($hybridauth_conf); $adapter = $hybridauth->getAdapter($oauth_id[0]); $adapter->logout(); } catch (Exception $e) {} } } }