Support Forum

spProfileFailure message

1
Peter Landon
Member
Free Members
Aug 15, 2014 - 4:58 am

Hi,

I've set my forum to a compulsory change of password when a new user first logs on. When they log on the message at the top of the screen says:

<p class="spProfileFailure">Forum rules require you to change your password in order to view forum or save your profile</p>

Otherwise, it seems to be working. The password can be changed and the new user can log in formally thereafter. 

How can I get rid of the coding part of the message?

regards

Peter

Yellow Swordfish
Glinton, England
Member
Aug 15, 2014 - 5:22 am

Wow. I AM surprised that has not come up before now. Looks like a small bug. I will open a ticket now and investigate for a fix. If it is easy I can post it here but it WILL get into the next update due alongside WordPress 4 which is now in beta 4.

Sorry about that... I guess not many people use this feature!

Yellow Swordfish
Glinton, England
Member
Aug 15, 2014 - 5:45 am

If you do not want to wait for the update and are happy to make code changes then the file you need to edit is:

/forum/profile/ahah/sp-ahah-profile.php

You need to scroll down to line 363 - about 75% of the way through the file. Locate the block of code that reads:

$msg = sp_text('Forum rules require you to change your password in order to view forum or save your profile');
$msg = apply_filters('sph_change_pw_msg', $msg);
$message = '<p class="spProfileFailure">'.$msg.'</p>';
$message = esc_js($message);

and change it to the code lines below:

$msg = sp_text('Forum rules require you to change your password in order to view forum or save your profile');
$msg = apply_filters('sph_change_pw_msg', $msg);
$msg = esc_js($msg);
$message = '<p class="spProfileFailure">'.$msg.'</p>';

and that should fix it up for you. Again - apologies for the oversight.

1