Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to access profile plugin data in Joomla?

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 454
    Comment on it

    Hello friends,

    Today we learn how we can access the profile plugin data in Joomla. To access the profile data User - Profile plugin should be enabled. Otherwise it will only display current user id.

    To access the data you need to write the following code:

    jimport('joomla.user.helper');
    $userprofile=JUserHelper::getProfile();
    

    First we will import the JUserHelper class. After that, we will call the getProfile() function of the helper class. It will return the profile information of current logged-in user.

    To get the profile details of a particular user you need to pass the id of the user as a parameter to the getProfile() function as follows:

    jimport('joomla.user.helper');
    $userid='value';//value is the userid whose profile information is required
    $userprofile=JUserHelper::getProfile($userid);

    So using getProfile() function we can find out the profile details of a particular user.

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: