diff options
author | root <root@diekershoff.homeunix.net> | 2010-12-23 23:50:54 +0100 |
---|---|---|
committer | root <root@diekershoff.homeunix.net> | 2010-12-23 23:50:54 +0100 |
commit | 2f532f579c8b3a7052f67c72af901bf2926a85bf (patch) | |
tree | 6779dd94c7bd466330839f61658a9d31170db296 /mod/settings.php | |
parent | a1d593613d737d6f1a694adaddf515187580105c (diff) | |
parent | c55cb45855ede35e593f6a1ed5e5878144cf0ad0 (diff) | |
download | volse-hubzilla-2f532f579c8b3a7052f67c72af901bf2926a85bf.tar.gz volse-hubzilla-2f532f579c8b3a7052f67c72af901bf2926a85bf.tar.bz2 volse-hubzilla-2f532f579c8b3a7052f67c72af901bf2926a85bf.zip |
Merge branch 'master' of git://github.com/friendika/friendika
Diffstat (limited to 'mod/settings.php')
-rw-r--r-- | mod/settings.php | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/mod/settings.php b/mod/settings.php index 4743ecd66..6eaa17ad0 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -109,7 +109,17 @@ function settings_post(&$a) { $str_group_deny = perms2str($_POST['group_deny']); $str_contact_deny = perms2str($_POST['contact_deny']); - $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 WHERE `uid` = %d LIMIT 1", + $openidserver = $a->user['openidserver']; + + if($openid != $a->user['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); + } + + $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", dbesc($username), dbesc($email), dbesc($openid), @@ -124,6 +134,7 @@ function settings_post(&$a) { intval($allow_location), dbesc($theme), intval($maxreq), + dbesc($openidserver), intval(local_user()) ); if($r) @@ -301,7 +312,9 @@ function settings_content(&$a) { '$pagetype' => $pagetype )); - call_hooks('settings_page',$o); + call_hooks('settings_form',$o); + + $o .= '</form>' . "\r\n"; return $o; |