summaryrefslogtreecommitdiffstats
path: root/settings/help.php
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2013-01-14 19:45:17 +0100
committerLukas Reschke <lukas@statuscode.ch>2013-01-14 19:45:17 +0100
commit31b1a73e1f508a33843835b632ee05c7bfc2aaaf (patch)
treee590662315799744155151b2c6c9148d2e9e860e /settings/help.php
parentfa78fbe0c3e281c91468bee92c871be7b1e48c79 (diff)
downloadnextcloud-server-31b1a73e1f508a33843835b632ee05c7bfc2aaaf.tar.gz
nextcloud-server-31b1a73e1f508a33843835b632ee05c7bfc2aaaf.zip
Check if user is admin - bool
There was no "isAdminUser()" function which returned bool. This is irritiating as there were a loooooooot of places in the code which checked this itself with `OC_Group::inGroup($uid, 'admin)` - why not use a function for this? (Especially if you consider that we might change the group name in the future, which would lead to problems then) Additionally, @Raydiation needed such a method for his AppFramework :)
Diffstat (limited to 'settings/help.php')
-rw-r--r--settings/help.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/settings/help.php b/settings/help.php
index cd3d615425c..a5ac11ec9a3 100644
--- a/settings/help.php
+++ b/settings/help.php
@@ -27,7 +27,7 @@ $url1=OC_Helper::linkToRoute( "settings_help" ).'?mode=user';
$url2=OC_Helper::linkToRoute( "settings_help" ).'?mode=admin';
$tmpl = new OC_Template( "settings", "help", "user" );
-$tmpl->assign( "admin", OC_Group::inGroup(OC_User::getUser(), 'admin') );
+$tmpl->assign( "admin", OC_User::isAdminUser(OC_User::getUser()));
$tmpl->assign( "url", $url );
$tmpl->assign( "url1", $url1 );
$tmpl->assign( "url2", $url2 );