1. HappyWebbie
  2. Support
  3. Tuesday, May 24 2016, 05:09 AM
Hi,

I have created a custom profile template and used the code below to reposition the email address.

<pre class="line-numbers"><code class="language-markup">$user=JsnHelper::getUser($this-&gt;data-&gt;id);
echo $user-&gt;getField('email',true);</code></pre>

But:
1. The field is always visible even after toggling the privacy settings. (bug?)
2. The field is displayed twice. (I don't know how to unset the field)

Any help would be much appreciated.

Best regards,
Jeff
Accepted Answer
admin Accepted Answer
Admin
Hi,
you have right, not works for email field, to fix try to replace file /components/com_jsn/helpers/helper.php with attached file.
Attachments (1)
  1. more than a month ago
  2. Support
  3. # Permalink
admin Accepted Answer
Admin
Hi,
The field is always visible even after toggling the privacy settings. (bug?)
I have just tried and works, but keep in mind that administrators skip privacy settings.

The field is displayed twice. (I don't know how to unset the field)
Have you removed this field from profile? see screenshot.
Attachments (1)
  1. more than a month ago
  2. Support
  3. # 1
HappyWebbie Accepted Answer
Content Protected
  1. more than a month ago
  2. Support
  3. # 2
admin Accepted Answer
Admin
Can you please post me your site details to check this? you can use the form below the reply in "Site Details" tab
  1. more than a month ago
  2. Support
  3. # 3
HappyWebbie Accepted Answer
Here are my site's details
  1. more than a month ago
  2. Support
  3. # 4
HappyWebbie Accepted Answer
Content Protected
  1. more than a month ago
  2. Support
  3. # 5
HappyWebbie Accepted Answer
Just another question: can I let a raw field value obey the privacy settings?
  1. more than a month ago
  2. Support
  3. # 6
admin Accepted Answer
Admin
Hi,
sorry this is not possible, you can get privacy value from
$user->privacy_email


this can have these values:
0 - Public
1 - Registered
99 - Private
  1. more than a month ago
  2. Support
  3. # 7
HappyWebbie Accepted Answer
sorry this is not possible, you can get privacy value from

Ah yes, I already figured that out....

$user->privacy_email

Great. Just what I was looking for!
  1. more than a month ago
  2. Support
  3. # 8
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.