• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: Auto populate from jos_users script

Auto populate from jos_users script 14 years 8 months ago #11193

  • lucrece
  • lucrece's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 3
Okay, the code to auto populate from jos_comprofiler works great.

Unfortonately, thanks to a silly glitch on Community Builder's part, email is one of the only data strings not stored in that table. So I'm looking for some help on modifying the code to pull from jos_comprofiler to pull from jos_user, the default Joomla login storage, which I am sure will be very helpful to many.

Here is what I have so far:

//<code>
$my = & JFactory::getUser();
$db = JFactory::getDBO(); $myid = $my->id;
if ($myid > 0)
{
$db->setQuery("SELECT `email` FROM `jos_users` WHERE `user_id`='".$myid."' LIMIT 1");
$result = $db->loadResult();
}
return $result;
//</code>


Where jos_users is the name of the table and 'email' is the name of the string in the table. So far, it doesn't work. Any suggestions?
The administrator has disabled public write access.

Re:Auto populate from jos_users script 14 years 2 months ago #13000

  • rocquoone
  • rocquoone's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 22
  • Thank you received: 1
Did you ever get this working? I have the same question.
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!