Skip to Content Skip to Menu

[SOLVED] problem with API

  • saman2
  • saman2
  • ONLINE
  • Posts: 404
  • Thanks: 7
  • Karma: -1
6 years 6 months ago - 6 years 6 months ago #304020 by saman2
[SOLVED] problem with API was created by saman2
hi
I use CB API according CB Document to edit user, but it have a problem, when set firstname and lastname.when i set firstname and lastname it is set in CB(comprofiler table) but can not save in joomla user management.
i can set email and other thing but for firstname and lastname i have a problem.how to resolve that?
Last edit: 6 years 6 months ago by krileon. Reason: Added [SOLVED] tag to subject

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48444
  • Thanks: 8279
  • Karma: 1443
6 years 6 months ago #304030 by krileon
Replied by krileon on topic problem with API
The API documentation below is raw user stores. It does not go through normal processes like profile edit. This means it won't compile firstname, middlename, and lastname into just name for Joomla. You need to do that your self.

www.joomlapolis.com/documentation/279-community-builder/tutorials/18362-registering-a-user-through-cb-api

So if you have the below.

Code:
$user->set( 'firstname', 'Tom' ); $user->set( 'lastname', 'Jones' );

You need to also do the below.

Code:
$user->set( 'name', 'Tom Jones' );


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 or Create an account to join the conversation.

  • saman2
  • saman2
  • ONLINE
  • Posts: 404
  • Thanks: 7
  • Karma: -1
6 years 6 months ago #304032 by saman2
Replied by saman2 on topic problem with API

krileon wrote: You need to also do the below.

Code:
$user->set( 'name', 'Tom Jones' );

i forget to do this and it is my problem.now it is resolved.CB API is very good and help in many case.thank you kyle for develop CB as a best component in joomla...
The following user(s) said Thank You: nant, krileon

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

Moderators: beatnantkrileon
Powered by Kunena Forum