Exemplo n.º 1
0
 function begin_consumer($url)
 {
     global $openid_auth_request;
     if ($openid_auth_request == NULL) {
         set_error_handler(array('WordPressOpenID_Logic', 'customer_error_handler'));
         if (WordPressOpenID_Logic::isValidEmail($url)) {
             $_SESSION['openid_login_email'] = $url;
             set_include_path(dirname(__FILE__) . PATH_SEPARATOR . get_include_path());
             require_once 'Auth/Yadis/Email.php';
             $mapped_url = Auth_Yadis_Email_getID($url, trailingslashit(get_option('home')));
             if ($mapped_url) {
                 $url = $mapped_url;
             }
         }
         $consumer = WordPressOpenID_Logic::getConsumer();
         $openid_auth_request = $consumer->begin($url);
         restore_error_handler();
     }
     return $openid_auth_request;
 }