Topic-icon Full profile + silent registration

Active Subscriptions:

None
10 years 10 months ago #11380 by fb_1301949083
Hello!
Thank you for this great component!

One question:
I use J 1.6 and JomSocial.
If I choose pseudo profile, "silent" (one click) registration works fine, exactly how I want it.

My site has "autologin" plugin installed and we send to users some email-notifications with links like index.php?user=xxx&passw=xxx(md5) .
But "pseudo profile" users don't get password.
Is it somehow possible to generate random password and keep silent registration?

Thank You!
The topic has been locked.
Support Specialist
10 years 10 months ago #11381 by alzander
Alex,
Absolutely! To start, this code change won't create a 'pretty' password (that may be good) and the password won't be automatically emailed to the user, so they wouldn't be able to see it.. but if you know PHP, you can easily change this or come up with a way to email it to a user. Should you need more information on how to do it though, just let us know.

To make the change, and come up with a random password for a new user, you'll need to edit the /plugins/authentication/jfbconnectauth/jfbconnectauth.php file. Around line 140-150 (don't have it directly in front of me), you'll see the following line:
$user['password_clear'] = "";

Change that to:
$user['password_clear'] = substr(md5(time()), 0, 10);
This is a pretty random password in that it's taking the exact time (which shouldn't really be known), taking the MD5 of it, and then taking the first 10 characters and using it as the password. Again.. pretty secure, but if you're running a bank, please come up with something else.

I haven't tested the change above at all, so please do.. and let us know your results! Hopefully, this will be all you need, but if not, you know where to find us.

Alex
The topic has been locked.
Active Subscriptions:

None
10 years 10 months ago #11382 by fb_1301949083
Thank You very much.

Probably I need to change line 208 from
$instance->set('password_clear', $user['password_clear']);
to
$instance->set('password', $user['password_clear']);

as well. :)

It works, and it is all what I need.
Thanks again for your product and great support.
The topic has been locked.
Support Specialist
10 years 10 months ago #11383 by alzander
You shouldn't need to change that code at the bottom. The $user variable is what I had you set (above) with the password, and then it's passed into that function.. won't hurt to have it there, but it's really only necessary in one of the 2 places.

Glad that worked, and no problem for the support. It's what we do, and thank you for your subscription! Should you need anything else, just let us know, and good luck!
Alex
The topic has been locked.
Active Subscriptions:

None
10 years 10 months ago #11384 by fb_1301949083
Alex, sorry, but it doesn't work if I don't change! :)

This is original code:

$instance->set('id', 0);
        $instance->set('name', $user['fullname']);
        $instance->set('username', $user['username']);
        $instance->set('password_clear', $user['password_clear']);
        $instance->set('email', $user['email']); // Result should contain an email (check)
        $instance->set('usertype', 'deprecated');
        $instance->set('groups', array($defaultUserGroup));

Have a look again. :)
The topic has been locked.
Support Specialist
10 years 10 months ago #11388 by alzander
Looked again, still not sure why that's required, but frankly, if you got it going.. stick with it. I'll keep investigating as well :)

We do have a plan for a future release (likely not for a few months) to have the option to auto-generate and email the password to users with a customizeable message "You can now log in with Facebook or this user account: username: xxx, password: yyy".. Until then though, please make sure that when you upgrade JFBConnect, you'll need to make this change again.

Finally, please consider leaving a rating and review on the Joomla Extension Directory for JFBConnect and/or our support:
extensions.joomla.org/extensions/social-...ook-integration/7215

Thanks, and best of luck to you and your site,
Alex
The topic has been locked.
Social Stream
Hide. Seek. Play!

Countdown Hide & Seek Game

Countdown, the new hide & seek toy, is available now! Designed and developed by the founders of SourceCoast, it's the perfect toy to get your kids moving at all ages.

Get the Hide and Seek Toy on Amazon