Login.Profile
Last edited by Helen Warner on Aug 27, 2013.
This is a user-contributed Extra. If you find issues or would like more info or help, please contact the author.
What is Profile?
Profile sets all the current User's (or a specified User's) Profile fields as placeholders, allowing you to display User Profile information on a page.
Usage
Simply add this Snippet to whatever page you want to set the User's Profile fields as placeholders on:
[[!Profile]]
And then display them with placeholders like such:
<p>Username: [[+username]]</p> <p>Email: [[+email]]</p> <p>State: [[+state]]</p>
The password fields are never set as placeholders, and are never accessible, for security reasons.
Profile Properties
Profile comes with some default properties you can override. They are:
Name | Description | Default |
---|---|---|
prefix | A string to prefix all placeholders for fields that will be set by this Snippet. | |
user | Optional. Either a user ID or username. If set, will use this user rather than the currently logged in one. | |
useExtended | If true, will set as placeholders all extended fields as well. | 1 |
Example
Display the currently logged in user's email and username.
[[!Profile]] <p>Username: [[+username]]</p> <p>Email: [[+email]]</p>
Grab the profile for the user 'marksmith', and add a prefix to the placeholders of 'user.':
[[!Profile? &user=`marksmith` &prefix=`user.`]]
Display the currently logged in username's favorite color (an extended field), with the prefix of 'usr.':
[[!Profile? &prefix=`usr.`]] <p>[[+usr.username]]'s favorite color is [[+usr.color]]</p>
See Also
- Login.Login
- Login.Profile
- Login.UpdateProfile
- Login.Register
- Login.ConfirmRegister
- Login.ForgotPassword
- Login.ResetPassword
- Login.ChangePassword
- Login.Tutorials
- Login.Roadmap
Suggest an edit to this page on GitHub (Requires GitHub account. Opens a new window/tab).