diff options
author | Thomas Willingham <founder@kakste.com> | 2012-04-02 00:29:27 +0100 |
---|---|---|
committer | Thomas Willingham <founder@kakste.com> | 2012-04-02 00:29:27 +0100 |
commit | 210586eaed18afc4d9ff613ee8f1ea0acdec621a (patch) | |
tree | 49c8e91f210815eeccd6925457664f39380f0a82 /mod/friendica.php | |
parent | 8406803473773404b18b95c709da0b8f5da59d3c (diff) | |
parent | 23dc376364b7d8f8e27e3493fe3edbf5cf768a35 (diff) | |
download | volse-hubzilla-210586eaed18afc4d9ff613ee8f1ea0acdec621a.tar.gz volse-hubzilla-210586eaed18afc4d9ff613ee8f1ea0acdec621a.tar.bz2 volse-hubzilla-210586eaed18afc4d9ff613ee8f1ea0acdec621a.zip |
Merge remote-tracking 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'], |