How to access user profile in a Page

Each Freemarker cloudCMS page has access to pre-defined set of variables. One of those variable is "wbuser", which denotes the current logged in user.

"wbuser" Attributes

nickNameThe "nickName" of user.
emailThe email of Google's user.
authDomainDomain against which user was authenticated
adminboolean - Whether logged user is Admin or not.
userLoggedInboolean - User is logged in or not.
loginURLGoogle Login URL relative to current page.
logoutURLGoogle Logout URL relative to current page.
remoteAddrUser's remote IP address
userAgentUser's browser information.

Using this attribute you can create authenticated users or admin only pages.

Check for admin user

<#if wbuser.admin?? && wbuser.admin  >
Welcome ${wbuser.nickName}

blog comments powered by Disqus

Last Modified : Jul 10, 2009 2:32:51 PM