aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-01-02 21:20:17 -0800
committerFriendika <info@friendika.com>2011-01-02 21:20:17 -0800
commit03e15bd22f41ad24eba2b97442e2dc1920efb149 (patch)
tree0be46340f750f191f3460fb29eaba72de281d5ef /mod
parent0a485e66647fb58e58e1a4bcab350109ff28cb22 (diff)
downloadvolse-hubzilla-03e15bd22f41ad24eba2b97442e2dc1920efb149.tar.gz
volse-hubzilla-03e15bd22f41ad24eba2b97442e2dc1920efb149.tar.bz2
volse-hubzilla-03e15bd22f41ad24eba2b97442e2dc1920efb149.zip
don't update openidserver if openid is empty
Diffstat (limited to 'mod')
-rw-r--r--mod/settings.php14
1 files changed, 9 insertions, 5 deletions
diff --git a/mod/settings.php b/mod/settings.php
index 273e8baa8..079c835b5 100644
--- a/mod/settings.php
+++ b/mod/settings.php
@@ -117,11 +117,15 @@ function settings_post(&$a) {
// If openid has changed or if there's an openid but no openidserver, try and discover it.
if($openid != $a->user['openid'] || (strlen($openid) && (! strlen($openidserver)))) {
- logger('updating openidserver');
- require_once('library/openid.php');
- $open_id_obj = new LightOpenID;
- $open_id_obj->identity = $openid;
- $openidserver = $open_id_obj->discover($open_id_obj->identity);
+ if(strlen($openid)) {
+ logger('updating openidserver');
+ require_once('library/openid.php');
+ $open_id_obj = new LightOpenID;
+ $open_id_obj->identity = $openid;
+ $openidserver = $open_id_obj->discover($open_id_obj->identity);
+ }
+ else
+ $openidserver = '';
}
$r = q("UPDATE `user` SET `username` = '%s', `email` = '%s', `openid` = '%s', `timezone` = '%s', `allow_cid` = '%s', `allow_gid` = '%s', `deny_cid` = '%s', `deny_gid` = '%s', `notify-flags` = %d, `page-flags` = %d, `default-location` = '%s', `allow_location` = %d, `theme` = '%s', `maxreq` = %d, `openidserver` = '%s' WHERE `uid` = %d LIMIT 1",