Re: Disable name change in Profile?
Your right, I tried this again and it worked fine… See, what I thought was that with this code, that the display name would be grayed out completely, which I don’t think it is for Admins, but regular users might see the box empty. Currently, users can still edit their display name from the bppress profile with this code, BUT when they go to save it, the changes won’t actually take place, which is a very good thing. I understand the purpose of having a login username and a display name, which I guess is fine for security purposes. But, for old school people like me, I prefer one username and one login name combo in one.
Now, the user can still change their display name by going to the wp-profile area, and then choose which display name they want to go by. Which I guess is not that bad. But, I guess, I would still prefer to find a way to shut that off in the near future.
But, then again, WP is so picky about using duplicate e-mails. I have not found a way to allow for users to register a new account with the same e-mail address. That can be a real pain in the rear, especially if you are testing the user registration process yourself. So, that leaves users that want to change their display name in the future with the option to change it in the WP-Profile area. Although, I prefer to find a way to shut that off entirely. But, I can’t just get rid of the WP-Profile link, because it has the ability for users to change their password and so far I don’t see a way for BP to allow users to change their password in the BP areas? Unless someone knows a way to add that option in the users BP-profiles or knows a link that leads directly to the option for a user to change just their passwords?
I want to say that I am impressed that by adding this code to either its own blank .php file and placing it into the mu-plugins, that it worked so nicely. I did try it in the regular plugins directory and it did not take effect. I also had embedded it as you ‘Jeff Sayre’ had stated in the bp-themes template functions.php and that worked fine too.
I then did one more test with this. I registered a new user through the registration process, and of course the Username field comes up due to WP requesting it and the BP-Display Name field comes up due to BP requesting it. Luckily, because of the code, it didn’t matter what the user entered in the BP Display Name, it would only recognize the username from the WP Username field in the registration. Which, yes I know, they are two totally different things, but I feel more at ease that this actually worked.
Although, now users that register will be confronted with both of these questions, and I guess if they think their entering a display name for the BP-Field they will be very disappointed to find that their username will take default.
So, for now, I guess the only remedy is by changing the label ‘display name’ that BP profile uses to ‘username’. Because, although a person enters a display name in the registration part of the BP display name field, it doesn’t show up in the WP-profile area as a nickname option. Either because of the code conflicts or BP wasn’t made to do that. Not sure. OR I guess you could just relabel to inform that display names can only be changed or created in your WP-Profile area… Oh… So confusing…
My hats off to ‘Jeff Sayre’ and ‘Andy Peatling’. I truly hope that this might become an actual option in the newer bp press versions.