Which SQL query for first name, last name, phone number?

1 month 2 weeks ago #329805 by WoodyF4u
I would like to retrieve the user information such as first name, last name, phone number from Community Builder database tables.
I made a form with Balbooa Forms.
In it I can have fields automatically filled with a SQL query.

I understand the query to select a user by ID, but I would like to retrieve the data from the currently logged in user.

Who can help me with the correct SQL query?

Best regards,
Wouter
The Netherlands

Please Log in to join the conversation.

1 month 2 weeks ago #329818 by krileon
Core CB fields and custom CB fields are all stored in the _comprofiler table. You'll find that information there. For core Joomla fields you'll find that information in _users. I cannot help you with custom coding, sorry. Suggest reviewing those tables carefully and trying queries in phpmyadmin.


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.

Please Log in to join the conversation.

1 month 2 weeks ago #329822 by WoodyF4u
Thank you for your response.
In comprofiler I see all the data of all users.
But I can't find a value there that indicates that it is the specific logged in user.

Suppose I want to display the first name of the logged in user in a form field.
Where could I find it?

Best regards,
Wouter
The Netherlands

Please Log in to join the conversation.

1 month 2 weeks ago #329833 by krileon
Login status is entirely contained in Joomla's sessions. Those are stored in the _sessions table. If they have a row in that table matching their userid they're logged in.


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.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.163 seconds

Facebook Twitter LinkedIn