diff options
author | zottel <github@zottel.net> | 2012-03-30 09:03:43 +0200 |
---|---|---|
committer | zottel <github@zottel.net> | 2012-03-30 09:03:43 +0200 |
commit | 2212e6931096d188be2dea27bcb4877f16c5c2f8 (patch) | |
tree | a0a6b3cec6b1b4108c62ff689e8842d49226b982 /mod/friendica.php | |
parent | 953840cf822718cba66a0727b576c674c6e44875 (diff) | |
parent | d22b3a1d9c295f5545cc20e1af786cb79e6553a5 (diff) | |
download | volse-hubzilla-2212e6931096d188be2dea27bcb4877f16c5c2f8.tar.gz volse-hubzilla-2212e6931096d188be2dea27bcb4877f16c5c2f8.tar.bz2 volse-hubzilla-2212e6931096d188be2dea27bcb4877f16c5c2f8.zip |
Merge remote branch 'upstream/master'
Diffstat (limited to 'mod/friendica.php')
-rwxr-xr-x | mod/friendica.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/mod/friendica.php b/mod/friendica.php index d5dad9448..52a064224 100755 --- a/mod/friendica.php +++ b/mod/friendica.php @@ -4,8 +4,12 @@ function friendica_init(&$a) { if ($a->argv[1]=="json"){ $register_policy = Array('REGISTER_CLOSED', 'REGISTER_APPROVE', 'REGISTER_OPEN'); + $sql_extra = ''; + if(x($a->config,'admin_nickname')) { + $sql_extra = sprintf(" AND nickname = '%s' ",dbesc($a->config['admin_nickname'])); + } if (isset($a->config['admin_email']) && $a->config['admin_email']!=''){ - $r = q("SELECT username, nickname FROM user WHERE email='%s'", $a->config['admin_email']); + $r = q("SELECT username, nickname FROM user WHERE email='%s' $sql_extra", dbesc($a->config['admin_email'])); $admin = array( 'name' => $r[0]['username'], 'profile'=> $a->get_baseurl().'/profile/'.$r[0]['nickname'], |