Forum Discussion

heavenerp's avatar
heavenerp
Leader
12 years ago

Is there a context object available for verified e-mail for a user?

I would like to display a message inside a custom component object using freemarker.  

 

I want it to only display for users that are registered, but have not yet verified their e-mail address.

 

Any help would be appreciated.

 

Thx!

Doug

  • 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

     

      • ChhamaJ's avatar
        ChhamaJ
        Khoros 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