aboutsummaryrefslogtreecommitdiffstats
path: root/mod/friendica.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-03-29 18:22:20 -0700
committerfriendica <info@friendica.com>2012-03-29 18:22:20 -0700
commit75f778a504c6032c6e029c741be8354419130741 (patch)
treee480d78a350aa133c2bfced7eed82fdc9e44cd7c /mod/friendica.php
parent5921dc6f1679afdcc0551da248f94d24db9ed360 (diff)
downloadvolse-hubzilla-75f778a504c6032c6e029c741be8354419130741.tar.gz
volse-hubzilla-75f778a504c6032c6e029c741be8354419130741.tar.bz2
volse-hubzilla-75f778a504c6032c6e029c741be8354419130741.zip
provide a way to specify an admin account for siteinfo if more than one have admin email address
Diffstat (limited to 'mod/friendica.php')
-rwxr-xr-xmod/friendica.php6
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'],