Skip to Content Skip to Menu

🎃 Happy Halloween! Treat yourself with an awesome discount on memberships! Get 20% off now with code SPOOKY-2024!

Auto-Action: possible to generate email when registering ?

  • dotcom22
  • dotcom22
  • OFFLINE
  • Posts: 522
  • Thanks: 14
  • Karma: 4
11 years 1 month ago - 11 years 1 month ago #233491 by dotcom22
My actual registration form ask only few thing such first and last name, email and phone. I used Auto-Action for generated a unique username (firstname+userid) and the password is auto-generated with CB. This setup work well for my case.

I would like now allow to register (from frontend) some specific user without providing email address and this is not possible due to Joomla constraint. So I wondering if using Auto-Action could allow me to auto-generate a dummy address.

I tested by adding in CB form a YES/NO radio option (pre-filled by default YES) who ask if one email will be provided during registration. If yes the process is made like usual. If not (that mean if radio NO is ticked by user) using conditional email field is hidden and set to not-required. Then I tried to setup a "Registration" action (see attached screenshot) but I get always an error who say I must provide a valid email address. I tried different combination in this action and I tried also to use another "Field" action without more success. I tried to set the field itself no required but I get always same error who disallow to register and disallow to see if my action work.

It seem is possible to do what I want but I don't see how to bypass email field validation.


any clue ?

thank

I use Joomla 3.3.6 - CB 2.0.4 - CBSubs 4 - Several Incubator plugins
Attachments:
Last edit: 11 years 1 month ago by dotcom22.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48466
  • Thanks: 8280
  • Karma: 1443
11 years 1 month ago #233520 by krileon
You need to provide a valid email address. Registration action is no exception to this. It is required by Joomla and thus required by CB.


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.

  • dotcom22
  • dotcom22
  • OFFLINE
  • Posts: 522
  • Thanks: 14
  • Karma: 4
11 years 1 month ago #233535 by dotcom22
Yes my goal is well to provide a valid and unique address. The only difference is to automate this task instead to ask user to fill by itself the field. As I said. the address could be generated based of some unique data (such firstname+userid@my-domain.com) for guaranteed a unique address even if in reality this address is just a fake.

It must be possible to insert this address before email validation for let registration process be made without problem.

Really not possible to find a workaround ??

I use Joomla 3.3.6 - CB 2.0.4 - CBSubs 4 - Several Incubator plugins

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48466
  • Thanks: 8280
  • Karma: 1443
11 years 1 month ago #233544 by krileon
There's no feature to generate email address, no. You'd need to develop a plugin to do this or try using CB Auto Actions to alter the POST to change the email address. You'd need to check that the supplied email address exists or not already then edit it to append +TEXT, but then you're opening your userbase up for spam registrations and emails.


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.

  • dotcom22
  • dotcom22
  • OFFLINE
  • Posts: 522
  • Thanks: 14
  • Karma: 4
11 years 1 month ago #233555 by dotcom22

or try using CB Auto Actions to alter the POST to change the email address.


Yes this is exactly what I would like to do but I don't see which Action I'm supposed to use and how this can be done..

You'd need to check that the supplied email address exists or not already then edit it to append +TEXT,


If I append a custom text + [user_id] + my domain (the result could be: NO-EMAIL345@my-domain.com) it will not necessary to check if this email exist because user_id will be unique and created during registration.


but then you're opening your userbase up for spam registrations and emails.


No because in my case, I have already a custom plugin who allow some specific trusted user to register new user from frontend. These trusted users are already logged-in and only them can register user (registration form is not public). For let me make this it was necessary to make a small CB hack. I could develop a custom plugin for handle this process but ideally I would prefer do this using Auto-Action if possible.

Could you give me some clue please ?

I use Joomla 3.3.6 - CB 2.0.4 - CBSubs 4 - Several Incubator plugins

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48466
  • Thanks: 8280
  • Karma: 1443
11 years 1 month ago #233563 by krileon

Yes this is exactly what I would like to do but I don't see which Action I'm supposed to use and how this can be done..

A Code action with Method set to PHP lets you use whatever PHP you like. Example as follows.

Code:
$_POST['email'] = '[firstname]+[user_id]@cb.invalid';

Before registration trigger I believe may work, but may need to use a trigger even earlier in the process.

If I append a custom text + [user_id] + my domain (the result could be: NO-EMAIL345@my-domain.com) it will not necessary to check if this email exist because user_id will be unique and created during registration.

Oh, I see; you're making fake email addresses and not aliases.


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.

Moderators: beatnantkrileon
Powered by Kunena Forum