Skip to Content Skip to Menu

[SOLVED] Use a password to register

  • andrew432
  • andrew432
  • OFFLINE
  • Posts: 72
  • Thanks: 8
  • Karma: 2
10 years 8 months ago #240604 by andrew432
Replied by andrew432 on topic Use a password to register
Thanks but I'm still struggling with creating the query, the two fields I am trying to compare are text fields, is this the start of my problems? should these be password fields?

First I have the groupjive user group selected from a cbgjautojoin field on the registration form, I need to locate the owner of the selected group.

Once I have the group owner I need to get a text field from their profile.

Then confirm that this is the same as a text field entered on the registration form by the new user. I can see Field entry validation in the field but can't see how I would link this to the query field.

Regards,
Andrew

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48478
  • Thanks: 8281
  • Karma: 1443
10 years 8 months ago #240655 by krileon
Replied by krileon on topic Use a password to register
It doesn't particularly matter what type of field it is. Below example should work fine.

Text Field 1 (cb_text1): This is for the first user to supply a password to match against.

Text Field 2 (cb_text2): This is for the new user to supply a password to match against the first user. See the below Query Validation usage to validate it.

Query:
Code:
SELECT `id` FROM `#__comprofiler` WHERE `cb_text1` = '[value]'
Validate On: Successful Results

That should cause the Text Field 2 to only validate if the value supplied matches a users Text Field 1 value.


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.

  • andrew432
  • andrew432
  • OFFLINE
  • Posts: 72
  • Thanks: 8
  • Karma: 2
10 years 8 months ago #241288 by andrew432
Replied by andrew432 on topic Use a password to register
Excellent, that works, but the same password works with all groups.

As there are multiple groups, each with their own password when created how do I get the password for the selected group into the query?

The user selects the group to join from a cbgjautojoin field on the registration form, and the owner of the group has the password in their profile.

Regards,
Andrew

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48478
  • Thanks: 8281
  • Karma: 1443
10 years 8 months ago #241299 by krileon
Replied by krileon on topic Use a password to register
You can't. The ajax doesn't know the other fields values. It can only know the value of the field being edited.


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.

  • andrew432
  • andrew432
  • OFFLINE
  • Posts: 72
  • Thanks: 8
  • Karma: 2
10 years 8 months ago #241301 by andrew432
Replied by andrew432 on topic Use a password to register
OK, I will need to rethink this then.

Is it possible to create an auto action to verify the fields and approve or reject the registration?

Regards,
Andrew

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48478
  • Thanks: 8281
  • Karma: 1443
10 years 8 months ago #241307 by krileon
Replied by krileon on topic Use a password to register
No, CB Auto Actions is designed to not interrupt a triggers normal behavior. Registration also ignores user cancel so redirecting won't stop registration. It maybe possible to set a $_PLUGIN global error in a Code action with PHP method, but I'm not sure if that'll stop it or not. Ideally you should create a new fieldtype plugin that fits your specific needs; I can't really see a way to generalize what you're wanting.


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