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.054 seconds

Hi first of all I'd like to say that J-Cook is a great tool - the best component builder I tried so far...
Rymedia - Jonas 

Get Started