public static function getUser($id, $private = FALSE) { if ($private) { $user = self::getLoggedInUserInstance()->getUser($id, TRUE, TRUE); } else { $user = self::getConsumerInstance()->getUser($id, FALSE, FALSE); } parent::setAvailableCategories($user); return $user; }
public static function getLoggedInAccount() { if (isset(self::$logged_in_account)) { return self::$logged_in_account; } if (user_is_anonymous()) { return NULL; } global $user; self::$logged_in_account = user_load($user->uid); return self::$logged_in_account; }