Forum Discussion
5 Replies
- ChhamaJ12 years agoKhoros Staff
There is no direct user freemarker context object for this, but you can use settings context object to get email verified setting and check if its true or false.The setting context object should be like
${settings.name.get(
"user.email_verified"
)}.
Hope this helps.
Regards,
Chhama - heavenerp12 years agoLeader
We will try this, thanks so much!
- ChhamaJ12 years agoKhoros Staff
I spoke too soon, my apologies. When I tested this , it seems settings context object only works for corenode settings and not for user settings. The other option you can try is make the following restapi call to get the verification status. If the email has been verified, then the value is true else this returns nothing (blank).
/restapi/vc/users/login/<login>/settings/name/user.email_verified or /restapi/vc/users/self/settings/name/user.email_verified
A point to note is that this call works only for admin or for the user itself.
Hope this helps. Sorry for the confusion.
Regards,
Chhama - heavenerp12 years agoLeader
Thanks so much for your help. It seems that there is an issue with the "Ask a Question" widget, it will allow a user to be directed to the Post a new message page via this widget even when the user has not verified their e-mail address and the setting of "Require user to verify e-mail" has been enabled.
What then happens, is that the user types their post and attempts to post the message and the page just refreshes over and over.
Until this is fixed, we are placing an announcement on the post page, just for people that have not verified their e-mail address so they are aware it is a requirement.
The first snippet in your 2nd reply worked, and we are going to deploy today! Thanks again.
- IzabelaU12 years agoLithium Alumni (Retired)
Hi Heavenerp,
The behavior you described with the Ask a Question widget is definitely not intended. I'm not sure yet if this is a recent regression, but I've notified our team to get this fixed in the near future. Thanks for letting us know!
Related Content
- 10 days ago
- 3 years ago
- 12 years ago