0

I have a scenario where I am using Solspace's Facebook Connect to allow users to become a member and login to a website.

I would like to give the user the ability to create a password on their profile page so they can login the traditional way.

I have experimented with Freemember and User and both require a current password to update/create a new password.

In my research I saw a suggestion to use free member's reset password functionality which would work but is inconvenient to the user (submit email, check email, click link, create password) so am looking for something better.

My guess is because it is part of EE's native functionality to supply current password when updating a user's password (even for a super admin), that this might be an impossibility.

Can anyone help? Any suggestions?

3
  • I have run into similar frustrations with Solspace Facebook Connect. The system isn't designed to create member accounts that can be accessed via traditional email and password login. For starters, the email address won't even be saved as the member's username if they login via FBC, so the reset password form won't even find their email in the database. Jul 9, 2014 at 9:29
  • One of my clients has a lot emails `@facebookmail" on database. Is really annoying for the users to not have a real e-mail and a real password.
    – Sobral
    Jul 9, 2014 at 19:16
  • 1
    I use emails as usernames for all my sites and free member makes things easier for this. Free member also has a great reset password process where the reset email link can take you straight to a page where the user can enter in their desired password rather than it being sent to you and then having to update it to something you want in user settings. Jul 10, 2014 at 16:51

2 Answers 2

1

Yeah, you're pretty much down to writing your own add-on which accepts the new password, then manually updates it. The core of the logic would like like this (after someone submitted your custom form):

if(ee()->input->post('password') == ee()->input->post('password_confirm'))
{
    ee()->load->library('auth');
    ee()->auth->update_password(
        ee()->session->userdata('member_id'),
        ee()->input->post('password')
    );
    // Redirect them or whatever
}
else
{
    ee()->output->show_user_error('submission', 'Your passwords must match!');
}
0

I found a solution.

I was able to use Yuri's Social Login module to achieve what I wanted.

Upon registration via FB a password is not set by the module, and Yuri has it setup so you can optionally set a password after they're logged in.

And the extra good news is if someone is an existing EE member and their FB email matches their EE one, they can sign in with FB to that same account making things seem less, giving you the ability to have FB login and a traditional login working side by side.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.