Skip to Content Skip to Menu

is there a way to use reset password with custom field?

  • saman2
  • saman2
  • ONLINE
  • Posts: 404
  • Thanks: 7
  • Karma: -1
6 years 6 months ago - 6 years 6 months ago #303770 by saman2
hi
1-i want to send forget password(or new pass or anything you say) to his mobile phone number via sms, instead of email.how to do that? do you suggest use php function?
note: (i have and can use sms web service to send every text)
note: i find comprofiler.html.php line 608 static function lostPassForm . is there any easier way or must use that function?

2-how can i check his 2 custom field and if that are correct, send the reset password?for example i want ask him his phone number and his father name and if both is correct, then run the lostpass function.
Last edit: 6 years 6 months ago by saman2.

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 #303796 by krileon

1-i want to send forget password(or new pass or anything you say) to his mobile phone number via sms, instead of email.how to do that? do you suggest use php function?
note: (i have and can use sms web service to send every text)
note: i find comprofiler.html.php line 608 static function lostPassForm . is there any easier way or must use that function?

We have no functionality for this. Best I can suggest is write the necessary PHP to do it within a Code action using CB Auto Actions acting on the onAfterPasswordReminder trigger. To suppress the email simply override the language strings UE_NEWPASS_SUB and UE_NEWPASS_MSG to empty string.

2-how can i check his 2 custom field and if that are correct, send the reset password?for example i want ask him his phone number and his father name and if both is correct, then run the lostpass function.

You can use the onLostPassForm trigger in CB Auto Actions and a Code action to insert new inputs into the forgot login form. Your PHP needs to be sure to return an array though with the first value of the array being the input label and the second being the actual input. The return behavior would be done under the Layout parameters.

Neither of the above are simple tasks and you'll need extensive PHP experience in addition to understanding how Code actions work with the Layout parameters.


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 - 6 years 6 months ago #303815 by saman2

To suppress the email simply override the language strings UE_NEWPASS_SUB and UE_NEWPASS_MSG to empty string.

are you sure suppress or it send an empty email to user?

krileon wrote: You can use the onLostPassForm trigger in CB Auto Actions and a Code action to insert new inputs into the forgot login form. Your PHP needs to be sure to return an array though with the first value of the array being the input label and the second being the actual input. The return behavior would be done under the Layout parameters.

can you please more describe? are you understand what i want exactly?
i say clearly:
some of my users has a fake email but he(them) has a real mobile phone number and i want do something in lostpassword form that he can insert his real phone number in the Email field in the lostpassword form.(and do such work for username field and replace with other custom cb field for example fathername) is it possible by your describe? can you please say me how to get the value of email field that he send to me? and is it need to disable email validation or user name validation?
Last edit: 6 years 6 months ago by saman2.

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 #303824 by saman2

krileon wrote: We have no functionality for this. Best I can suggest is write the necessary PHP to do it within a Code action using CB Auto Actions acting on the onAfterPasswordReminder trigger.

i want get the value of the email field , after user send lostpassform. how to get it from that form?
(i do such as this for registration form but in the lostpassform , i don't understand properly subsitiution)

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 #303831 by krileon

are you sure suppress or it send an empty email to user?

You're wanting to send an SMS. I assumed you didn't want it to send the email. In which case you'd translate the email subject and body to empty so it won't send. Otherwise if you want the email to still send simply don't translate it to empty.

some of my users has a fake email but he(them) has a real mobile phone number and i want do something in lostpassword form that he can insert his real phone number in the Email field in the lostpassword form.(and do such work for username field and replace with other custom cb field for example fathername) is it possible by your describe? can you please say me how to get the value of email field that he send to me? and is it need to disable email validation or user name validation?

No, that's not possible. The email field validates emails only. There is no phone number handling in the forgot login form. You are going to have to custom code a solution. Either by inserting new inputs into the forgot login form then adding new jQuery so your new input can validate then adding PHP side processing for your new input all of which will use the triggers explained in my previous reply or by writing your own forgot login solution.

i want get the value of the email field , after user send lostpassform. how to get it from that form?
(i do such as this for registration form but in the lostpassform , i don't understand properly subsitiution)

If you're using CB Auto Actions then you can grab it from POST using [post_INPUTNAME]. For forgot login that'd be [post_checkemail].


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: saman2

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 - 6 years 6 months ago #303832 by saman2

krileon wrote: If you're using CB Auto Actions then you can grab it from POST using [post_INPUTNAME]. For forgot login that'd be [post_checkemail].

where is compeelet list of this type of substitutions like this [post_checkemail] ?
i read exactly www.joomlapolis.com/documentation/18353-using-substitutions-throughout-cbthis page but can't find this.

krileon wrote: Either by inserting new inputs into the forgot login form then adding new jQuery so your new input can validate then adding PHP side processing for your new input all of which will use the triggers explained in my previous reply or by writing your own forgot login solution.


only my problem is how to insert new input? can you give my little code example to insert new input instead of email field?
how to work with Layout parameter in the autoaction code in the output tab in CB? is there documentaion for that?
Last edit: 6 years 6 months ago by saman2.

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

Moderators: beatnantkrileon
Powered by Kunena Forum