@@ 501-513 (lines=13) @@ | ||
498 | * |
|
499 | * @return booleean Admin or not |
|
500 | */ |
|
501 | public static function isAdmin() |
|
502 | { |
|
503 | global $xoopsUser, $xoopsModule; |
|
504 | if (is_object($xoopsUser)) { |
|
505 | if (in_array(XOOPS_GROUP_ADMIN, $xoopsUser->getGroups())) { |
|
506 | return true; |
|
507 | } elseif (isset($xoopsModule) && $xoopsUser->isAdmin($xoopsModule->getVar('mid'))) { |
|
508 | return true; |
|
509 | } |
|
510 | } |
|
511 | ||
512 | return false; |
|
513 | } |
|
514 | ||
515 | /** |
|
516 | * Returns the current date in the Mysql format |
@@ 644-656 (lines=13) @@ | ||
641 | * |
|
642 | * @return booleean Admin or not |
|
643 | */ |
|
644 | public static function isAdmin() |
|
645 | { |
|
646 | global $xoopsUser, $xoopsModule; |
|
647 | if (is_object($xoopsUser)) { |
|
648 | if (in_array(XOOPS_GROUP_ADMIN, $xoopsUser->getGroups())) { |
|
649 | return true; |
|
650 | } elseif (isset($xoopsModule) && $xoopsUser->isAdmin($xoopsModule->getVar('mid'))) { |
|
651 | return true; |
|
652 | } |
|
653 | } |
|
654 | ||
655 | return false; |
|
656 | } |
|
657 | ||
658 | /** |
|
659 | * Returns the current date in the Mysql format |