XF 2.2 Allow users to change email if they didn't have one?

bottiger

Active member
Is it possible to allow people to change their emails if they didn't have one set?

I used an addon to allow people to sign in through steam, and it allowed people to create an account without an email.

When they try to change or setup a password or add an email, they are unable to do so because it requires a verification sent to their current email, which doesn't exist.
 
Last edited:
An administrator will need to manually set an email address for accounts without one.

Members can set a new email address via their account page even if there isn't one already set.
 
If all they have is a user name but no email addres and no password, then either they are very remiss or they are a hacker.

No need to be a hacker at all. The Steam plugin for xenforo 1 allowed people to create and login to accounts without a password or email.

Anyway I extended the class myself so emails can be changed without a password if there wasn't one present.

PHP:
                    $form->validate(function($form) use ($visitor, $input, $emailChange)
                    {
                            $no_password = $user->Auth === null || $user->Auth->scheme_class == 'XF:NoPassword';

                            if ($no_password === false && !$visitor->authenticate($input['password']))

I was hoping to get some coding help so I wouldn't have to spend an hour digging through the source. But anyway, I think this logic needs to be present in the core.
 
Last edited:
Back
Top Bottom