Mr. Jinx
Well-known member
I want to check for the user option 'allow_view_profile' and 'allow_view_identities' in a template.
What is the proper way to check for this? $user.____?
{{dump($user)}}
What is the proper way to check for this? $user.____?
{{dump($user)}}
Code:
User {#299 ▼
-`XF\Mvc\Entity\Entity`">_uniqueEntityId: 5
#rootClass: "XF\Entity\User"
#_useReplaceInto: false
#_newValues: []
#_values: array:34 [▶]
#_relations: array:6 [▼
"PermissionCombination" => null
"Privacy" => UserPrivacy {#223 ▼
-`XF\Mvc\Entity\Entity`">_uniqueEntityId: 1
#rootClass: "XF\Entity\UserPrivacy"
#_useReplaceInto: false
#_newValues: []
#_values: array:6 [▼
"user_id" => 1
"allow_view_profile" => "none"
"allow_post_profile" => "members"
"allow_send_personal_conversation" => "members"
"allow_view_identities" => "none"
"allow_receive_news_feed" => "everyone"
]
#_relations: []
#_previousValues: []
#_options: []
#_deleted: false
#_readOnly: false
#_writePending: false
#_writeRunning: false
#_errors: []
#_cascadeSave: []
#_behaviors: null
}
"Profile" => UserProfile {#302 ▶}
"Option" => UserOption {#301 ▶}
"Admin" => Admin {#300 ▶}
"Activity" => SessionActivity {#345 ▶}
]
#_previousValues: []
#_options: []
#_deleted: false
#_readOnly: false
#_writePending: false
#_writeRunning: false
#_errors: []
#_cascadeSave: []
#_behaviors: null
}