aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Martin <caedes@sindominio.net>2012-11-05 08:26:39 +0000
committerroot <root@ops.vz.lan>2012-11-05 08:26:52 +0000
commita35ff10e414c2ec30ba305742fc60e606bd87c89 (patch)
tree8b078c53bffd64c2ef6ef0b5063dd09102270736
parenta40dbdd3f9fb0032e935d77f369b574c0088be70 (diff)
downloadelgg-a35ff10e414c2ec30ba305742fc60e606bd87c89.tar.gz
elgg-a35ff10e414c2ec30ba305742fc60e606bd87c89.tar.bz2
remove error logs and manage openid1 properly.
-rwxr-xr-xlib/actions.php22
1 files changed, 9 insertions, 13 deletions
diff --git a/lib/actions.php b/lib/actions.php
index 40b1f7736..69ae0fb7d 100755
--- a/lib/actions.php
+++ b/lib/actions.php
@@ -23,8 +23,6 @@ function action_default()
$request = $server->decodeRequest();
- error_log("in action_default, request = ".print_r($request,true));
-
if (!$request) {
return ""; //about_render();
}
@@ -34,27 +32,26 @@ function action_default()
if (in_array($request->mode,
array('checkid_immediate', 'checkid_setup'))) {
- error_log("in action_default, about to run isTrusted");
-
- if (isTrusted($request->identity, $request->trust_root, $request->return_to)) {
- error_log("in action_default, yes, is trusted");
- $response =& $request->answer(true);
+
+ $identity = getLoggedInUser();
+ if (isTrusted($identity, $request->trust_root, $request->return_to)) {
+ if ($request->message->isOpenID1()) {
+ $response =& $request->answer(true);
+ } else {
+ $response =& $request->answer(true, false, getServerURL(), $identity);
+ }
} else if ($request->immediate) {
- error_log("in action_default, yes, immediate");
$response =& $request->answer(false, getServerURL());
} else {
if (!getLoggedInUser()) {
- error_log("in action_default, calling login render");
#return login_render();
system_message(elgg_echo('openid_server:not_logged_in'));
return gatekeeper();
#return action_login();
}
- error_log("in action_default, calling trust render");
return trust_render($request);
}
- error_log("in action_default, about to add sreg fields");
- addSregFields(&$response);
+ addSregFields(&$response);
} else {
$response =& $server->handleRequest($request);
@@ -149,7 +146,6 @@ function action_trust()
$info = getRequestInfo();
$trusted = isset($_POST['trust']);
if ($info && isset($_POST['remember'])) {
- error_log("setTrustedSite0");
$store->setTrustedSite($info->trust_root);
}
return doAuth($info, $trusted, true);