ChronoEngine.com homepage

Forums

Please write a review for the extension you are using on the Joomla extensions directory before posting a new question as we are being spammed by many negative reviews.

Thank you for your support!

How to set a random password for useractivation in Chronoforms 6

galbur 12 Jun, 2019
Hi

In the Version 5 i had the "User Registration" Action with email activation, random password, Send Joomla activation and so on.
I miss this in Version 6. How can i set a Random Password for example?

Thank you
Best regards
Christoph
GreyHead 12 Jun, 2019
Hi Christophe,

There are some suggestions here

Bob
healyhatman 12 Jun, 2019
Put a PHP block before your user registration, call it "password"
$alphabet = "abcdefghijklmnopqrstuwxyzABCDEFGHIJKLMNOPQRSTUWXYZ0123456789";
$pass = []; for ($i = 0; $i < 8; $i++) { $n = rand(0, count($alphabet)-1); $pass[$i] = $alphabet[$n]; } return $pass;
Then use {var:password} in your user registration action.
galbur 13 Jun, 2019
Hi Bob and healyhatman

Thanks for helping!
Maybe i did something wrong?
So i have the customcode before the joomla user action:

https://allerhand.ch/temp2/chronoforms_custom_code.png

The PHP code looks like this:
https://allerhand.ch/temp2/chronoforms_custom_code2.png

Then i have var:password in the password field provider

http://allerhand.ch/temp2/chronoforms_custom_code3.png

All the Best
Christoph

BTW: the Image Uploadfunction in your Forum is still not working ...
healyhatman 13 Jun, 2019
PHP block not custom code block.
GreyHead 13 Jun, 2019
Hi,

Not tested but I think that needs an implode($pass, ''); before the return line.

Bob
galbur 14 Jun, 2019
Hi
Thank you. So i tried to use the code with a php-block. I'm not shure. Do i have to use the php code with or without <?php ?> Brackets within the php-block?
So anyway it doesn't work.

This is my setup :

https://allerhand.ch/temp2/chronoforms_registration_form_action.png

All the best
Christoph
This topic is locked and no more replies can be posted.

2Checkout.com

2CheckOut.com Inc. (Ohio, USA) is an authorized retailer for goods and services provided by ChronoEngine.com