User information and the $my object |
11/16/2006 |
If
during the development of a component or a module you wish to display
information corresponding to the users of your Joomla site, like their
name, their address email, or the date of their last visit or that you
want to propose to the administrators to be able to manage the
component since FrontEnd of your website, then you will have to use the total object $my.
We thus propose to you to discover all its properties
|
Id of the connected user or 0 if it is a not-connected visitor |
|
Complete name (Last name + First name) of the user |
|
login of the user |
|
email of the user |
|
Password of the user. |
|
Level
of the user. This property can take the values: `superadministrator',
`administrator', `editor', `to use', `author', `publisher' or `manager' |
|
Takes value 1 if the user is blocked (0 per default) |
|
Takes value 1 if the user receives the system emails (0 per default) |
|
This property take values 0, 1, or 2 according to the group of which the user forms (Public, Registered, Special) |
|
Date when the user was registered on the site. |
|
Date from the last visit of the user |
|
The key activation of the account |
|
This property can contain various specific user data such as the text editor used |
Example:
if ( $my->usertype == "Administrator" or $my->usertype == "Super Administrator" ) {
// Codes allowing the administration of your component in Front end
}
|