Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

Joomla User Profile Data 18 Aug 2012 12:16 #3186

Actually it is possible from Cook to get Joomla User Data.
Instead user profile data provided from the Joomla standard plugin "User-Profile" is not available from Cook.
For information user-profile is a plugin that complements the standard Joomla User. (address city etc...)
Is there a way to get such data in Cook?

joomla tables:
xxx_users
xxx_user_profiles

Please Log in or Create an account to join the conversation.

Last edit: by e-struct.

Re: Joomla User Profile Data 21 Dec 2012 23:51 #6217

  • JoomGuy
  • JoomGuy's Avatar
  • Offline
  • Moderator
  • Moderator
  • Joomla Enthusiast, Lover of Cooking
  • Posts: 1115
  • Thank you received: 195
I think the cleanest option would be to create add an event trigger upon login to bind() the additional profile data to the user object. The custom profile data from your profile plugin will then be available from the user object.

Also, and I have to say at this point this is untested: Try using;
<?php
 
$user = JFactory::getUser();
$profile = JUserHelper::getProfile($user->id);
var_dump($profile);
 
//each plugin adds its own object  loaded with an array so you can access your fields like this
echo $profile->profile['address1']; 
?>
From ammonitenetworks.com/14-joomla/13-access...-joomla-user-profile

Hope it helps,

Gez
Need help with your Cook/Joomla Project? . PM me to find out what I can help with. NO time wasters please!!!

Please Log in or Create an account to join the conversation.

Re: Joomla User Profile Data 06 Jun 2013 20:37 #7388

  • VeCrea
  • VeCrea's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • Absolute JCook fan
  • Posts: 473
  • Thank you received: 100
For those interested, it works.
But should remove the var_dump

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Time to create page: 0.086 seconds

Awards for the best Joomla app. This product is gonna win an award for this amazing job. Cook Self Service is the the best application from all over the Joomla universe ! It brings Joomla to a professional level really advanced for developers. It is a real fun to develop with it. The ACL part and security checks implementation are just... so much hours saved. I can now concentrate myself more on the design part and the creative works. Thank you so much. Guys I offer you all my congratulation ! Keep up the works because Joomla is needing it to increase the quality of extensions availables on the JED. I also learned a lot because I can see how to code at the proper place and I found all my answers reading the forum.
lack_hanson (JED)
          

Get Started