Users sending email to themselves

3 years 8 months ago - 3 years 8 months ago #275300 by mikeprince
I have set Email Handling in CB Configuration to "Display Link to Email Form". With the email field also set to display on profile, this means the field is shown as a "Send Email" link, and the CB menu item "Send Email to User" is present also. All good. However if a user views their own profile, the CB menu item is correctly omitted, but the field "Send Email" link is incorrectly still shown, as this is a link that would mean the user sends an email to themselves. Note that if they follow the link an error is given ("You are not allowed to send an email to yourself!") but it would be a better user experience to prevent them from getting this far.

Rather than removing the email field from the profile in this instance, it would make sense if it was displayed back to the user as text and not a link.

(Latest versions: Joomla 3.4.6, CB 2.0.12)

Cheers
-- Mike --

Record, share and compare with BUBO Listing at www.bubo.org
3 years 8 months ago #275301 by mikeprince
I've just implemented an acceptable workaround for this using substitutions in the Profile Value Layout, i.e.
[cb:if user_id="myid"][email][/cb:if]
[cb:if user_id!="myid"][value][/cb:if]

Cheers
-- Mike --

Record, share and compare with BUBO Listing at www.bubo.org
The following user(s) said Thank You: nant
Moderators: beatnantkrileon
Time to create page: 0.397 seconds
Facebook Twitter Google LinkedIn