Notifications
Clear all

Problems with PMs for User Profile

3 Posts
2 Users
1 Likes
183 Views
Posts: 506
Topic starter
(@central4allgmail-com)
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

https://prnt.sc/1z63_hV0OEhy

user is 98765

After clicking to send PM

https://prnt.sc/AfCjMraaPv2i

user is groovegr

 

Any idea how to fix that ?

2 Replies
Posts: 506
Topic starter
(@central4allgmail-com)
Prominent Member
Joined: 4 years ago

Any help here?

Reply
VereK
Posts: 402
(@verek)
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 () { ?>
	<style>

		#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;}

	</style>

* There is a plugin that can restrict usernames but it seems overly restrictive https://wordpress.org/plugins/restrict-usernames-emails-characters/ I have not tested it though.

Reply