User from API skips Email Confirmation

12 years 10 months ago - 12 years 10 months ago #165823 by clickmo
When I follow the steps in creating a user from an API, it is skipping the email confirmation step where it gets the user to click the activation link. It doesn't seam to matter what settings I change in the registration code either. From what I can tell the variables associated with this are:

(including only the important parts)
//passing $confirm = 2;
$confirmation	=	( $confirm == 2 ? $ueConfig['reg_confirmation'] : $confirm 	);


if ( $confirmation == 0 ) {
	$row->confirmed		=	1;
} else {
	$row->confirmed		=	0;
}

//should trigger the activation 
	if ( $row->store() ) {
		if ( ( $row->confirmed == 0 ) && ( $confirmation != 0 ) ) {
			$row->_setActivationCode(); //sets code and email? 
...

Is there a setting in community builder I need to change to get it to send the email? am I understanding the functions incorrectly?

Thanks for any help I can get.

Please Log in to join the conversation.

12 years 10 months ago - 12 years 10 months ago #165992 by krileon
Replied by krileon on topic Re: User from API skips Email Confirmation
The below function is used to send registration emails. The tutorial has not been updated to reflect this functions usage.
activateUser( $row, 1, 'UserRegistration' );

It should only be executed in case of successful registration.


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.

12 years 10 months ago - 12 years 10 months ago #166000 by clickmo
Replied by clickmo on topic Re: User from API skips Email Confirmation
Thanks Krileon,

Can you tell me what the parameters are? I understand $row but the other two are a bit ambiguous.

Not really necessary just curious :)

Please Log in to join the conversation.

12 years 10 months ago #166093 by krileon
Replied by krileon on topic Re: User from API skips Email Confirmation

Can you tell me what the parameters are? I understand $row but the other two are a bit ambiguous.

Review the function from source will give better knowledge of its usage, but if you're needing just for registration emails then leave as is. If you've an IDE such as Zend or NetBeans then add your Joomla install as a project and you should be able to click through the function to its source.


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.175 seconds

Facebook Twitter LinkedIn