• Module: core

The m_identity model manages usernames and other user identities. mod_authentication uses it to store and check salted passwords, but also provides a safe storage for user tokens of any kind, as used by mod_facebook and mod_twitter.

Note that a user does not have to be of the person category per se, in Zotonic anything can have identities attached to it.

The following m_identity model properties are available in templates:

Property Description Example value
is_user Check if a page id is an user. Return a bool. Usage: m.identity[page_id].is_user true
username Fetch the username, if any, of an user. Returns a binary or undefined. Usage: m.identity[page_id].username <<”admin”>>

See also

Access Control, mod_authentication, mod_twitter or mod_facebook.

Previous topic


Next topic