Joomla Access User Info - The user object
To get the user information for the current user:
$user = JFactory::getUser();
It will return the user object. Some of the user object variables:
- username (
- groups (
- email (
You can check if the user is logged-in with the:
You can check for the user's access privileges with the authorize function, e.g:
For extra custom fields, this depends on what you are trying to achieve. There is a Joomla core plugin "User Profile" which contains many custom profile fields and which you can customize further.
At the other hand there are other 3rd party extensions like Community Builder, JomSocial, Easy Social that let you build a user community site, where you can have users with extended profile information.
If you don't need to build a community, there are other extensions that either override/extend the com_user core component or they work in conjunction with it and give you extra control over the user management.
But as said, it depends on what you want to do. For example if you just plan to build a forum, the forum extensions have extra profile fields.
Of course there are alway more advanced solutions like building your own component or application.