Solved -> Issue with login from WP side (Ultimate Member plugin)

Taouche
User w
User w
Posts: 17
Joined: Thu Jun 02, 2016 11:38 am

Re: Solved -> Issue with login from WP side (Ultimate Member plugin)

Post by Taouche »

Hi Axew3,

About my issue with page forum template resizing. The footer doesn't appear completely and I just need to click on the minimize button or just resinzing the window of the web client and the scrollling bar appear and the footer appear and i can go it.

Do you tkink it is linked with java script parameter or it's other thing. ?

Regards
User avatar
axew3
w3all User
w3all User
Posts: 2883
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: Solved -> Issue with login from WP side (Ultimate Member plugin)

Post by axew3 »

Hi! Can you link the site here? Are you testing in localhost?
when the website turn into mobile size.
Not understand: you mean when you resize browser, or if in effect when you open it with a smartphone?

Better we move to another topic, please open a new one about.
cryptocollegenl

HELP-> Issue with login from WP side (Ultimate Member plugin)

Post by cryptocollegenl »

Please help me as I have encounter a problem with the login pager with the ultimate member plugin.

Please visit met website crypto-college.nl/registreer/ to register an account. After clicking the activation link, the message tells the user to login, but the password is ALWAYS incorrect.

It worked fine this morning before i renamed some of the pages the plugin uses like login, user, password-reset, etc

I am completely clueless
User avatar
axew3
w3all User
w3all User
Posts: 2883
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: Solved -> Issue with login from WP side (Ultimate Member plugin)

Post by axew3 »

I will take a look to grant compatibility with ultimate member plugin asap and i will return here in reply as ready
User avatar
axew3
w3all User
w3all User
Posts: 2883
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: Solved -> Issue with login from WP side (Ultimate Member plugin)

Post by axew3 »

So, about the Ultimate Member password problem:

All work fine, into wp_admin side, so when an user update his profile into native
/wp-admin/profile.php page
or an admin update an user via wp_admin page.

Pass update do not work into the frontend Ultimate Member profile page, when the user update his profile via UM pages because in this case, the Ultimate member do not fire the native
profile_update wp hook.

On UM profile updates, when pass changes, it just do this on file /ultimate-member/includes/core/um-actions-account.php

Code: Select all

 wp_set_password( $changes['user_pass'], um_user( 'ID' ) );
So i've try to use native UM hooks, as they are documented on code files, and of course i resolved the problem but, i had to add a function into the integration plugin, an hook, and edit another integration plugin function: UM in this case work fine but, throw/return an error to the user profile, and say Error Occurred on updating to the user, even if the password correctly changed/updated. To suppress the error, was necessary more code.

To not investigate more looking how UM throw errors, suppressing the js that fire the notice to the user on profile, and to be more short,
to fix i've try do this:

FIX Ultimate Member pass update/change on UM user's profile page:


since wp_set_password use/fire wp_hash_password we could do this then ...

open wp_w3all.php file and
where this code:

Code: Select all

if ( ! function_exists( 'wp_hash_password' ) && ! defined("WPW3ALL_NOT_ULINKED") ) :

function wp_hash_password( $password ) {
	 
	 $pass = WP_w3all_phpbb::phpBB_password_hash($password);
	return $pass;

}

endif;
change/replace with this:

Code: Select all

if ( ! function_exists( 'wp_hash_password' ) && ! defined("WPW3ALL_NOT_ULINKED") ) :

function wp_hash_password( $password ) {
	if ( ! defined( 'WP_ADMIN' ) &&  class_exists( 'UM' ) ) {
		 global $w3all_config,$wpdb;
		}
	 $pass = WP_w3all_phpbb::phpBB_password_hash($password);
	if ( ! defined( 'WP_ADMIN' ) &&  class_exists( 'UM' ) ) {
	 $w3phpbb_conn = WP_w3all_phpbb::wp_w3all_phpbb_conn_init();
	 $current_user = wp_get_current_user();
	 $wp_user_data = get_user_by( 'ID', $current_user->ID );
	 $phpBB_user_pass_set = WP_w3all_phpbb::phpbb_pass_update_res($wp_user_data, $pass);
	 $w3phpbb_conn->query("UPDATE ".$w3all_config["table_prefix"]."users SET user_password = '$pass' WHERE username = '".$current_user->user_login."'");
  }
	return $pass;

}

endif;
Should work fine.
It's strange that email is not a problem, it's correctly updated, while the password not on UM frontend profile page. I've not follow all the code flow, just find out a way to resolve that maybe will not be the definitive one. I will may return over.
User avatar
axew3
w3all User
w3all User
Posts: 2883
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: Solved -> Issue with login from WP side (Ultimate Member plugin)

Post by axew3 »

This topic has now been closed because obsolete.
Please follow into this instead:
viewtopic.php?f=2&t=1043
Locked