aboutsummaryrefslogtreecommitdiffstats
path: root/mod/settings.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/settings.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/settings.php')
-rw-r--r--mod/settings.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/mod/settings.php b/mod/settings.php
index 4743ecd66..af826c53b 100644
--- a/mod/settings.php
+++ b/mod/settings.php
@@ -109,7 +109,12 @@ 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="";
+ if ($openid != $a->user['openid'] && isset($a->user['openidserver'])){
+ $openidserver = ", `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." WHERE `uid` = %d LIMIT 1",
dbesc($username),
dbesc($email),
dbesc($openid),