Clear all

Problems with PMs for User Profile

3 Posts
2 Users
Posts: 506
Topic starter
Prominent Member
Joined: 4 years ago

I try to send a PM to a user,

i click to his profile and profile is opening, till here all good.

When i click to send him a PM opens to send to other member , not him

user is 98765

After clicking to send PM

user is groovegr


Any idea how to fix that ?

2 Replies
Posts: 506
Topic starter
Prominent Member
Joined: 4 years ago

Any help here?

Posts: 402
Honorable Member
Joined: 5 years ago

This is an old problem on WP. Members with just numbers or numbers at the beginning of their user names cause the system to parse to the member_id number recorded in table rather than the member_name. *I have not found an automated way to solve the problem.

When I get a new registration I edit their nickname to add an underscore at the beginning which solves the issue. Like so _98765.

You can then run a snippet to block users from changing their Nicknames so that they don't change it back and break the fix. You will have to switch it off every time you get a numbers registration you need to edit.

add_action( 'wp_head', function () { ?>

		#wpf-profile-account-form > div > div.wpf-tr.row-0 > div.wpf-td.wpfw-1.row_0-col_0.wpf-row-user_login.wpf-row-display_name.wpf-row-user_nicename.wpf-row-user_email.wpf-row-title.wpf-row-groupid.wpf-row-location.wpf-row-avatar.wpf-row-about.wpf-row-occupation.wpf-row-signature > div.wpf-field.wpf-field-type-text.wpf-field-name-user_nicename.wpf-field-required > div.wpf-field-wrap {
      pointer-events: none;}


* There is a plugin that can restrict usernames but it seems overly restrictive I have not tested it though.