aboutsummaryrefslogtreecommitdiffstats
path: root/mod/profile.php
diff options
context:
space:
mode:
authorfabrixxm <fabrix.xm@gmail.com>2010-12-23 21:52:51 +0100
committerfabrixxm <fabrix.xm@gmail.com>2010-12-23 21:52:51 +0100
commit68868fd74bbc6a6f2268b6c5467ccf9e025af011 (patch)
tree9d85e01ea95e1c036ab24f6de7a7397c56461b2b /mod/profile.php
parente47a816a8fd50f5fcec51652ada223773ddad11f (diff)
downloadvolse-hubzilla-68868fd74bbc6a6f2268b6c5467ccf9e025af011.tar.gz
volse-hubzilla-68868fd74bbc6a6f2268b6c5467ccf9e025af011.tar.bz2
volse-hubzilla-68868fd74bbc6a6f2268b6c5467ccf9e025af011.zip
OpenID delegation degrade gracefully if database table is not updated.
Diffstat (limited to 'mod/profile.php')
-rw-r--r--mod/profile.php32
1 files changed, 16 insertions, 16 deletions
diff --git a/mod/profile.php b/mod/profile.php
index 000e955ea..a5f440f43 100644
--- a/mod/profile.php
+++ b/mod/profile.php
@@ -20,24 +20,24 @@ function profile_init(&$a) {
if (!get_config('system','no_openid') && $a->profile['openid']!=""){
if (!isset($a->profile['openidserver'])){
- die('friendika user table must be updated. `openidserver` field is missing');
- }
- if ($a->profile['openidserver']==''){
- require_once('library/openid.php');
- $openid = new LightOpenID;
- $openid->identity = $a->profile['openid'];
- $a->profile['openidserver'] = $openid->discover($openid->identity);
-
- q("UPDATE `user` SET `openidserver` = '%s' WHERE `uid` = %d LIMIT 1",
- dbesc($a->profile['openidserver']),
- intval($a->profile['uid'])
- );
- }
+ logger('friendika user table must be updated. `openidserver` field is missing');
+ } else {
+ if ($a->profile['openidserver']==''){
+ require_once('library/openid.php');
+ $openid = new LightOpenID;
+ $openid->identity = $a->profile['openid'];
+ $a->profile['openidserver'] = $openid->discover($openid->identity);
+
+ q("UPDATE `user` SET `openidserver` = '%s' WHERE `uid` = %d LIMIT 1",
+ dbesc($a->profile['openidserver']),
+ intval($a->profile['uid'])
+ );
+ }
- $a->page['htmlhead'] .= '<link rel="openid.server" href="'.$a->profile['openidserver'].'" />'. "\r\n";
- $a->page['htmlhead'] .= '<link rel="openid.delegate" href="'.$a->profile['openid'].'" />'. "\r\n";
-
+ $a->page['htmlhead'] .= '<link rel="openid.server" href="'.$a->profile['openidserver'].'" />'. "\r\n";
+ $a->page['htmlhead'] .= '<link rel="openid.delegate" href="'.$a->profile['openid'].'" />'. "\r\n";
+ }
}