37 $this->
lng = $DIC->language();
47 $pub_prof = isset($user->prefs[
"public_profile"]) && in_array($user->prefs[
"public_profile"], [
48 self::PROFILE_DISABLED,
49 self::PROFILE_ENABLED_LOGGED_IN_USERS,
50 self::PROFILE_ENABLED_GLOBAL
52 ? $user->prefs[
"public_profile"]
53 : self::PROFILE_DISABLED;
54 if (!$settings->
get(
'enable_global_profiles') && $pub_prof == self::PROFILE_ENABLED_GLOBAL) {
55 $pub_prof = self::PROFILE_ENABLED_LOGGED_IN_USERS;
65 return in_array($this->
getMode(), [self::PROFILE_ENABLED_LOGGED_IN_USERS,
66 self::PROFILE_ENABLED_GLOBAL
81 case self::PROFILE_DISABLED:
82 return $lng->
txt(
"usr_public_profile_disabled");
83 case self::PROFILE_ENABLED_LOGGED_IN_USERS:
84 return $lng->
txt(
"usr_public_profile_logged_in");
85 case self::PROFILE_ENABLED_GLOBAL:
86 return $lng->
txt(
"usr_public_profile_global");
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
const PROFILE_ENABLED_LOGGED_IN_USERS
get(string $a_keyword, ?string $a_default_value=null)
get setting
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
isEnabled()
Is profile enabled.
getModeInfo(string $mode=null)
Get mode info.
__construct(ilObjUser $user, ilSetting $settings)
const PROFILE_ENABLED_GLOBAL