Simple Membership . Password empty or invalid

Post a reply


This question is a means of preventing automated form submissions by spambots.
Smilies
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :arrow: :| :mrgreen: :geek: :ugeek:

BBCode is ON
[img] is ON
[url] is ON
Smilies are ON

Topic review
   

If you wish to attach one or more files enter the details below.

Maximum filesize per attachment: 1 MiB.

Expand view Topic review: Simple Membership . Password empty or invalid

Re: Simple Membership . Password empty or invalid

by axew3 » Thu Jul 16, 2026 8:46 pm

Hello!
How to fix the login of the user, when coming to WordPress side with a valid phpBB cookie.

First of all i note that if the user is not added as member into the Simple Membership members list, this will not work.
The user will be logged in WordPress and will stay logged but the user will not result as logged into the SM front end.
But so assuming that the user exists into the Simple Memberships list of active members, to fix the login you could do this (as ever there are more ways to achieve the same changing something else, and also possibles improvement to this basic example so to fit any requirement):

Open class.wp.w3all-phpbb.php
Search for this line:

Code: Select all

if( $current_user->user_email != $phpbb_user_session[0]->user_email )
Change into:

Code: Select all

if( $current_user->ID > 1 && $current_user->user_email != $phpbb_user_session[0]->user_email )
Then search for this line of code:

Code: Select all

$wpuID = !empty($wpuID) ? $wpuID : 0;
So assuming SM is installed and active, Just after add this:

Code: Select all

$auth = SwpmAuth::get_instance();
$auth->login_to_swpm_using_wp_user( get_user_by('id', $wpuID) );
This will login the user everywhere.

Re: Simple Membership . Password empty or invalid

by pennymachines » Sat Jul 11, 2026 12:14 pm

axew3 wrote: Sat Jul 11, 2026 6:59 am I already have the idea on how to re-write from scratch the plugin once forever and i will do as i can.
That sounds ambitious!
axew3 wrote: Sat Jul 11, 2026 6:59 am Unfortunately my luck goes bad lately and i have many problems around to figure out.
I'm sorry to hear that.
axew3 wrote: Sat Jul 11, 2026 6:59 am Never forget this! https://wordpress.org/plugins/w3mypq/
Thank you for drawing attention to it. Ingenious and potentially useful plugin!

I'm afraid I've just found another problem...

With w3all WP network activated
When a user logs in using phpBB logon form:
They are logged onto phpBB, but they are not logged into WP.
When they visit any of my WP sites/subsites, they are not logged in.
And after they go back to phpBB they are no longer logged in.

With w3all WP network deactivated
When a user logs in using phpBB logon form:
They are logged onto phpBB, but they are not logged into WP sites/subsites (as expected).
But after they go back to phpBB they remain logged in to it.

Edit to add:
Actually, thinking about this, it's not a new problem. It's the old problem specific to the Simple Membership plugin.
I have got around it by modifying the phpBB logon form. My modified form opens in a modal and actually uses the WP Simple Membership logon system, then refreshes the phpBB page so the user can see they are logged on.

This works but it is slow 'hacky' (using iframe) and a bit unreliable. It would be much better if the standard phpBB logon could be used. I appreciate this is not a problem with w3all WP but an incompatibility with the Simple Membership plugin.

Re: Simple Membership . Password empty or invalid

by axew3 » Sat Jul 11, 2026 6:59 am

I already have the idea on how to re-write from scratch the plugin once forever and i will do as i can.
Unfortunately my luck goes bad lately and i have many problems around to figure out.
But i will there asap, as we like to say, stronger then ever ;)

ps do you have to share files in a secure and secret way?
Never forget this! https://wordpress.org/plugins/w3mypq/
I will do also the single standalone HTML file version that i interrupted due to lack of time.
I think nobody had the idea to do something like these tools.
There is only one way to have privacy over the www. And into our PC.
** If you are a Windows OS user or Android or iOS and you think that their encryption or decryption programs that you may use to encrypt files or Apps to send messages sets you secret and safe. If you think that there is another way than this to be secret, and you are not a security expert and a very advanced developer that coded all the necessaries routines from scratch without errors you are (probably) wrong.

And remember: it’s easy for someone at several network levels to sniff your data. And to decrypt your data. And for an analyst who picks up your device.

– Do not give them a chance

Re: Simple Membership . Password empty or invalid

by pennymachines » Fri Jul 10, 2026 12:03 pm

Great!

As you said, this does not fix the auto-logon, but it does fix the more serious "Password empty or invalid" problem when a user uses the Simple Membership logon form.

Thanks again!

Re: Simple Membership . Password empty or invalid

by axew3 » Sat Jul 04, 2026 9:43 pm

WordPress Multisite MU-MS
I see testing it now, that the create_phpBB_user_wpms do not run when a new user is created on WP MU-MS.
It changed along the time something?
To make it work the autologin upon new user registration and correctly add the user in phpBB:

file class.wp.w3all-phpbb.php

Search for

Code: Select all

private static function create_phpBB_user($wpu, $action = ''){

   if( empty($wpu) ){ return; }
After add:

Code: Select all

if( is_multisite() ){
 self::create_phpBB_user_wpms($wpu);
 return;
}
Then just after the starting line of code (declaration of the function):
private static function create_phpBB_user_wpms($username_id_object = '', $user_email = '', $key = '', $meta = '', $user = ''){

add this:

Code: Select all

  if(empty($user)){
   $user = $username_id_object;
  } 

The user will not be logged in automatically in this case.

Native SM login could be used in some other hook or changing something, anyway, i note that Simple Membership, beside some warning errors appearing all around if you are on DEBUG, use his own way to login users with his own cookie.

Code: Select all

$auth = SwpmAuth::get_instance();
$auth->login( $user->user_login, $_POST['password'] );

Re: Simple Membership . Password empty or invalid

by pennymachines » Wed Jul 01, 2026 10:10 pm

I'm sorry- this must be very frustrating.

I checked all code edits and ran a new test. I switched off 3 network plugins which I thought could possibly affect auto logons, I reverted to Simple Membership's default member login and registration pages, and I reverted to default (twenty twelve) theme (in case something in my functions.php was affecting auto logons).

Still no change. Newly registered user is directed to subsite home and is not logged on.
axew3 wrote: Wed Jul 01, 2026 8:11 pm Why your login redirect to a subsite? Due to some wp admin network setting maybe?
I can't see anything obvious in my admin network settings. Also, the redirect works fine as soon as I deactivate w3all.
It is perhaps worth mentioning that sometimes (but not always) a link from my phpBB forum to a specific WP subsite page also erroneously directs to subsite1 homepage. I have tried a couple of times to debug this, and then it occurs again. It would appear that there is a default to divert to subsite1 homepage when there is a problem with redirects.
axew3 wrote: Wed Jul 01, 2026 8:11 pm And the user is not logged into the main site or site where the user login?
The user is not logged into main or subsite. To be more accurate, what I am calling subsite1 is my main WP site (on which Simple Membership is activated).

Normally, but not for this test, I have a plugin called "Join My Multisite" network activated. It automatically adds newly registered users to all the subsites when they log in there, so a registered logged in user is logged in to all WP subsites and phpBB.

Top