Page 2 of 3

Re: Ultimate Members - Users Awaiting E-mail Confirmation can login

Posted: Tue Mar 30, 2021 11:41 pm
by axew3
So, this way can fix for any plugin and logins flows, just changing very few things (and this can be leaved into code by default):

open wp_w3all.php

where these lines:

Code: Select all

if( $w3all_add_into_phpBB_after_confirm == 1 )
{
just after, add the follow:

Code: Select all

  $umeta = get_user_meta($wpu->ID);

  if( isset($umeta['account_status'][0]) && $umeta['account_status'][0] != 'approved' ){
  	return;
   }
If the user should also autologin, a little code more need be added instead
earlier into function w3all_add_phpbb_user() to grab sent vars, and check against something like:

Code: Select all

 $umeta = get_user_meta($wpu->ID);
 if( isset($_GET['hash']) && isset($umeta['account_secret_hash'][0]) && $_GET['hash'] == $umeta['account_secret_hash'][0] )
    {
  	// add the user in phpBB (if already exist the function will return, with no effect)
       // login user in wp, that will setup also the phpBB session
      return;
    }
Activate only the option:
Add users in phpBB only after first successful login in WordPress

and disable the "add user as deactivated", into the integration plugin admin

i can produce also this little part of code if it is required, i will do (think) tomorrow adding a reply with all the complete procedure/code for Ultimate Member plugin.
I've read also other topic/question about cache plugin, i will take a look.

Re: Ultimate Members - Users Awaiting E-mail Confirmation can login

Posted: Wed Mar 31, 2021 12:20 pm
by Maverick87Shaka
Hi,
You got it! Thanks!
Adding just the code:

Code: Select all

  if( isset($umeta['account_status'][0]) && $umeta['account_status'][0] != 'approved' ){
  	return;
   }
will restore the Ultimate Member email link confirmation. If it doesn't have any other side effects ( actually on our side doesn't seem to create problem ) you can think to put it in the next plugin update, Ultimate member is quite diffused and helps a lot to manage and maintain users database.

I think it's all, you can consider it SOLVED ;)

Thanks!

Re: Ultimate Members - Users Awaiting E-mail Confirmation can login

Posted: Wed Mar 31, 2021 2:04 pm
by axew3
Finally, after a complete system re-installation i've take the time to re-install also common plugins into my test localhost.

So now i see anyway, that avatars are not working when ultimate members active.
There is some option on it, that do not let use wp avatars and that should be deactivated or what? You know?

Re: Ultimate Members - Users Awaiting E-mail Confirmation can login

Posted: Wed Mar 31, 2021 2:34 pm
by Maverick87Shaka
axew3 wrote: Wed Mar 31, 2021 2:04 pm Finally, after a complete system re-installation i've take the time to re-install also common plugins into my test localhost.

So now i see anyway, that avatars are not working when ultimate members active.
There is some option on it, that do not let use wp avatars and that should be deactivated or what? You know?
Actually we really don't care so much about users avatar, if the users want they have to setup manually their avatar for Wordpress with Ultimate Member, and do it again for phpbb.

It will be really cool have only one place to setup the avatar, and see in both wordpress and phpbb forum, but it's not really a mandatory for our projects.

I've a bad news by the way.

If the user try to login in the same browser instance of the registration, ti will receive the error message that he have to activate the account with the mail.
But if users open a private navigation tab or another browser, he can make the login even without click on the activation link in the email :-(

Re: Ultimate Members - Users Awaiting E-mail Confirmation can login

Posted: Wed Mar 31, 2021 3:06 pm
by axew3
If the user try to login in the same browser instance of the registration, ti will receive the error message that he have to activate the account with the mail.
But if users open a private navigation tab or another browser, he can make the login even without click on the activation link in the email
it is an ultimate member issue? Because this side, if the user result not active, the function return and the user is not added into phpBB.
The fact that it is in incognito or not mean nothing.

This applied solution resolve, there is no incognito mode that can interfere with:
https://www.axew3.com/w3/forums/viewtop ... 5220#p5220

Re: Ultimate Members - Users Awaiting E-mail Confirmation can login

Posted: Fri Apr 02, 2021 11:34 am
by Maverick87Shaka
axew3 wrote: Wed Mar 31, 2021 3:06 pm it is an ultimate member issue? Because this side, if the user result not active, the function return and the user is not added into phpBB.
The fact that it is in incognito or not mean nothing.

This applied solution resolve, there is no incognito mode that can interfere with:
https://www.axew3.com/w3/forums/viewtop ... 5220#p5220
I'll try without the WP_w3all to understand if this particular one it's a common problem of Ultimate Member and not related to the forum integration.