Welcome, Guest
Username: Password: Remember me

TOPIC: Joomla User Profile Data

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

  • e-struct
  • e-struct's Avatar
  • Offline
  • Senior Member
  • Posts: 76
  • Thank you received: 4
  • Karma: 5
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
Last Edit: 18 Aug 2012 12:19 by e-struct.
The administrator has disabled public write access.

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

  • JoomGuy
  • JoomGuy's Avatar
  • Offline
  • Moderator
  • Joomla Enthusiast, Lover of Cooking
  • Posts: 1115
  • Thank you received: 195
  • Karma: 64
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!!!
The administrator has disabled public write access.

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

  • VeCrea
  • VeCrea's Avatar
  • Offline
  • Platinum Member
  • Absolute JCook fan
  • Posts: 473
  • Thank you received: 100
  • Karma: 30
For those interested, it works.
But should remove the var_dump
The administrator has disabled public write access.
Time to create page: 0.081 seconds

Get Started