Skip to content
  1. Extras
  2. HybridAuth
  3. Snippets
  4. haProfile

haProfile

Snippet outputs information about user for organize the profile.

Options

NameDescription
&activeProviderTplChunk for output icon of the linked services.
&profileFieldsComma-separated list of user's fields allowed for edit. Also you can specify max length of values using colon. Example: &profileFields=`username:25,full name:50,email`
&profileTplChunk for output and edit user profile.
&providerTplChunk for displaying authorization link or for linking service with account.
&requiredFieldsList of required fields while editing. This fields must be filled for successful profile updating. Example, &requiredFields=`username,full name,email`

Examples

Snippet must be called not cached, because since depending on the authorization it displays a different chunks:

modx
[[!haProfile]]

The call editing profile with defining of allowed and required fields:

modx
[[!haProfile?
  &requiredFields=`email,username`
  &profileFields=`email,username:25,fullname:50,comment:100`
]]

Of course, you must add the additional fields to chunk &profileTpl, snippet not will make it itself.