aliases.id => aliases.uid
[platal.git] / modules / openid.php
index 5b4eaff..5818259 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2009 Polytechnique.org                              *
+ *  Copyright (C) 2003-2010 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -118,7 +118,7 @@ class OpenidModule extends PLModule
                 $openid_args = $server->GetQueryStringForRequest();
                 if (S::logged()) {
                     pl_redirect('openid/trust', $openid_args);
-                } else if (count($_POST)) {
+                } else if (Post::has('openid_mode')) {
                     pl_redirect('openid', $openid_args);
                 } else {
                     return PL_DO_AUTH;
@@ -197,8 +197,7 @@ class OpenidModule extends PLModule
 
         // Finally answers the request.
         if ($server->IsUserAuthorized($user) && $trusted) {
-            $server->AnswerRequest(
-                true, $user, Post::b('trust_sreg') ? $sreg_response : null);
+            $server->AnswerRequest(true, Post::b('trust_sreg') ? $sreg_response : null);
         } else {
             $server->AnswerRequest(false);
         }