Skip to Content Skip to Menu

[SOLVED] How to access CB user data from other component ?

  • mtaras
  • mtaras
  • OFFLINE
  • Posts: 8
  • Thanks: 0
  • Karma: 0
12 years 6 months ago - 12 years 6 months ago #197203 by mtaras
Hi,
I use CB as user manager for my site.

Now I need to have access to user data from some other components that I have develop or customized.

What I need to include to my component to have access to cb user data ?

To have access to joomla user manager I have to include the below code
Code:
<?php /** framework joomla check login user */ define( '_JEXEC', 1 ); define( '_VALID_MOS', 1 ); define('JPATH_BASE', dirname(__FILE__)); define( 'DS', DIRECTORY_SEPARATOR ); require_once ( JPATH_BASE .DS.'includes'.DS.'defines.php' ); require_once ( JPATH_BASE .DS.'includes'.DS.'framework.php' ); /* Create the Application */ $mainframe =& JFactory::getApplication('site'); $mainframe->initialise(); /* End joomla user framework */ ?>

Then I can user commands like "JFactory::getUser()->id" to get data from user.

Is there any method to access CB data from my component?

Thanks.
Last edit: 12 years 6 months ago by krileon.

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

  • mtaras
  • mtaras
  • OFFLINE
  • Posts: 8
  • Thanks: 0
  • Karma: 0
12 years 6 months ago #197207 by mtaras

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48442
  • Thanks: 8276
  • Karma: 1443
12 years 6 months ago #197237 by krileon
Please see tutorials within my signature where I've explained how to access CB API externally, how to prepare a user object, register a user object, obtain field values, etc..


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
The following user(s) said Thank You: mtaras

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

Moderators: beatnantkrileon
Powered by Kunena Forum