From 9358ac3f3fd26ec743c7aaa2245cdbb7bbe9fced Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Mon, 2 Mar 2015 18:42:52 +0100 Subject: Second Commit --- inc/user.inc.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'inc') diff --git a/inc/user.inc.php b/inc/user.inc.php index 30630d4..f023ae7 100644 --- a/inc/user.inc.php +++ b/inc/user.inc.php @@ -28,6 +28,11 @@ class User return self::$user !== false && self::$isShib === false; } + public static function getData() + { + return self::$user; + } + public static function getName() { if (!self::isLoggedIn()) @@ -60,6 +65,14 @@ class User return $org['organizationid']; } + public static function getOrganizationName() + { + $org = self::getOrganization(); + if (!isset($org['name'])) + return false; + return $org['name']; + } + public static function getRemoteOrganizationId() { if (empty(self::$user['organization'])) -- cgit v1.2.3-55-g7522