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
| Attribute | Description |
|---|---|
| nickName | The "nickName" of user. |
| The email of Google's user. | |
| authDomain | Domain against which user was authenticated |
| admin | boolean - Whether logged user is Admin or not. |
| userLoggedIn | boolean - User is logged in or not. |
| loginURL | Google Login URL relative to current page. |
| logoutURL | Google Logout URL relative to current page. |
| remoteAddr | User's remote IP address |
| userAgent | User'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}
</#if>
<#/noparse>
blog comments powered by Disqus
Last Modified : Jul 10, 2009 2:32:51 PM