|
@@ -19,9 +19,14 @@
|
|
|
* @return boolean
|
|
|
*/
|
|
|
function adm_check_user() {
|
|
|
- global $PHP_SELF;
|
|
|
+ global $PHP_SELF, $plugins;
|
|
|
require_once(SM_PATH . 'functions/global.php');
|
|
|
|
|
|
+ /* fail if the plugin is not enabled */
|
|
|
+ if ( !in_array('administrator', $plugins) ) {
|
|
|
+ return FALSE;
|
|
|
+ }
|
|
|
+
|
|
|
if ( !sqgetGlobalVar('username',$username,SQ_SESSION) ) {
|
|
|
$username = '';
|
|
|
}
|
|
@@ -58,4 +63,4 @@ function adm_check_user() {
|
|
|
function adm_array_trim(&$value,$key) {
|
|
|
$value=trim($value);
|
|
|
}
|
|
|
-?>
|
|
|
+?>
|