krileon wrote: I'd just use a redirect action and send them back to that users profile with a message if they're not authorized to edit them via your condition.
Can I use substitutions to create a conditíon like
'Logged in users´s' [cb_field] Not Equal To 'Profile owner´s [cb_field]
in order to check if they have the same value on [cb_field] ?
How do I pick up the value of [cb_field] for the currently logged in user?
Thanks.
Please Log in or Create an account to join the conversation.
Yes, use the user parameter in substitutions to do this. See the below substitution tutorial for usage information.Can I use substitutions to create a conditíon like
'Logged in users´s' [cb_field] Not Equal To 'Profile owner´s [cb_field]
in order to check if they have the same value on [cb_field] ?
How do I pick up the value of [cb_field] for the currently logged in user?
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
krileon wrote: That's CBs access check. To redirect before that gets displayed you have to use onBeforeUserProfileEditRequest trigger then perform your redirect. Return redirect likely won't work here. If you want to send them back to the users profile they're attempting to edit use the following redirect URL.
index.php?option=com_comprofiler&view=userprofile&user=[user_id]
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.