Simple Membership . Password empty or invalid

pennymachines
w3 User
w3 User
Posts: 100
Joined: Mon Feb 06, 2017 9:51 pm

Re: Simple Membership . Password empty or invalid

Post by pennymachines »

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!
User avatar
axew3
w3all User
w3all User
Posts: 3065
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: Simple Membership . Password empty or invalid

Post by axew3 »

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
pennymachines
w3 User
w3 User
Posts: 100
Joined: Mon Feb 06, 2017 9:51 pm

Re: Simple Membership . Password empty or invalid

Post by pennymachines »

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.
User avatar
axew3
w3all User
w3all User
Posts: 3065
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: Simple Membership . Password empty or invalid

Post by axew3 »

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.

This topic will be now closed but another can be opened!

PS NOTE
if you get
Fatal error: Uncaught Error: Class "SwpmAuth" not found
open the wp-w3all.php file and change this line of code:

Code: Select all

add_action( 'init', array( 'WP_w3all_phpbb', 'wp_w3all_phpbb_init'), 3);
into this:

Code: Select all

add_action( 'init', array( 'WP_w3all_phpbb', 'wp_w3all_phpbb_init'), 11);
see: viewtopic.php?p=7244#p7244
Locked