2

i am creating a customer dashboard component in joomla 3.2, so i want to display user profile fields to my view and able to edit fields as well, i am displaying them manually using
$this->user = JFactory::getUser(); and <?php echo $this->user->name; ?>
now i have to add the functionality to edit as well, like password, profile image etc. how could i implement this functionality to my custom component.

2
  • I would suggest you look at how com_users does it ;)
    – Lodder
    Commented Oct 15, 2014 at 12:16
  • yes i had gone through com_users, but i think it is complicated, or in may be i am getting the flow correctly, is their any simple way of doing thing manually. like creating the form and posting it. Commented Oct 15, 2014 at 17:07

1 Answer 1

2

Just an idea for a quick implementation: You could add a modal link to the com_users edit profile view in your component's view.

At the top of your view add:

JHTML::_('behavior.modal');

Then link like below:

<a class="modal" href="index.php?option=com_users&view=profile&layout=edit&tmpl=component?" rel="{handler: 'iframe', size: {x: 640, y: 540}}"> Edit Login Details</a>

This will open the edit profile layout in a modal window, without leaving your current page and have the com_users do the job, instead of re-creating the same functionality.

3
  • Thanks! @FFrewin, for now being im doing like this way only, displaying in popup modal. Additional, i have to remove basic settings fields from the com_user -> user profile as well. Commented Oct 16, 2014 at 7:05
  • though i am just calling that functionality here in my component, but for later use what method would be better so that i will be completely free to edit as i want in user profile section. Commented Oct 16, 2014 at 7:11
  • Note: To only retreive the profile values you can use: $profile = JUserHelper::getProfile($userid); Commented Mar 3, 2015 at 7:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.