Forum Discussion
keshavkelkar - The reason TariqHussain code is showing error is because:
isAdmin is not defined
apiVersion is not defined, should be 2.0
So, the working code would require you to define these variable before using. Once done, it'd work fine.
Try this for e.g.
<li>
<#assign qry = "select email from users where id = '${user.id}'" />
<#assign email = rest("2.0", "/search?q=" + qry?url + "&restapi.response_style=view").data.items[0].email />
<span class="label">Email:</span> <span class="value">${email}</span>
</li>
I hope this helps.
VarunGrazitti wrote:@keshavkelkar - The reason @tariq_grazitti code is showing error is because:
isAdmin is not defined
apiVersion is not defined, should be 2.0
So, the working code would require you to define these variable before using. Once done, it'd work fine.
Try this for e.g.
<li>
<#assign qry = "select email from users where id = '${user.id}'" />
<#assign email = rest("2.0", "/search?q=" + qry?url + "&restapi.response_style=view").data.items[0].email />
<span class="label">Email:</span> <span class="value">${email}</span>
</li>
I hope this helps.
VarunGrazitti keshavkelkar TariqHussain
I was able to get it to work using this method.
Question #2
I want to have the email visible for Moderators and not just those with Admin status.
How can I change the settings to reflect this?
Related Content
- 5 years ago
- 3 years ago
- 10 months ago