New feature: add admins profile [Config modified: ]
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@102 b3834d28-1941-0410-a4f8-b48e95affb8f
This commit is contained in:
parent
c86caa8866
commit
e58f84ce59
2 changed files with 11 additions and 1 deletions
|
@ -33,6 +33,9 @@ $sitename = 'SemanticScuttle';
|
|||
$welcomeMessage = 'More than tags...';
|
||||
# locale: The locale used (list ./locales : de_DE en_GB fr_FR it_IT lt_LT nl_NL zh_CN dk_DK es_ES hi_IN ja_JP pt_BR)
|
||||
$locale = 'en_GB';
|
||||
# admin users:
|
||||
# add users as admin by: $admins = array('adminnickname', 'user1nick', 'user2nick');
|
||||
$admin_users = array();
|
||||
|
||||
### display templates ###
|
||||
# top_include: The header file.
|
||||
|
|
|
@ -133,7 +133,14 @@ class UserService {
|
|||
}
|
||||
|
||||
function isAdmin($userid) {
|
||||
return false; //not implemented yet
|
||||
$user = $this->getUser($userid);
|
||||
|
||||
if(isset($GLOBALS['admin_users'])
|
||||
&& in_array($user['username'], $GLOBALS['admin_users'])) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function getCurrentUserId() {
|
||||
|
|
Loading…
Reference in a new issue