Hi guys I am trying to allow users that don't have email addresses to register using their mobile phones. What I have done is make the email field not required on the registration form, added the phone field to registration and made that required and then created an field Auto Action that triggers onBeforeSaveRegistrationRequest and sets the email address to the phonenumber@default.domain. For some reason I am still getting an "The email address you entered is invalid. Please enter another email address."
Last edit: 3 years 4 weeks ago by krileon. Reason: Added [#8807] tag to subject
The email address has to pass validation. If you're using a Field action on onBeforeSaveRegistrationRequest then you're also trying to trigger a premature user store. We don't have a fallback functionality for email fields only username fields. Joomla requires email address to function and so does CB in many regards so it can't be completely omitted from a new user create process. There isn't a trigger early enough with a user object to override this behavior.
Will see if I can improve the onStartSaveUserRegistration trigger to pass the new user object, which would allow for you to do what you're wanting using a Code action to modify the user object.
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: MarlonFungai
Yes, this has been implemented. The onStartSaveUserRegistration trigger now includes a reference object of the user being created. It's accessible with var1. You can use that trigger to set data on the user object that isn't being set by registration. Example as follows.
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.