Re: Disable name change in Profile?
I tried very hard to get this to work, and I can not get that code to work, even in the default template or even by creating a blank .php with pasting in the code listed above to upload to the mu-plugins directory.
I am very surprised that this worked for you, as I really needed this bad. Because, for some odd reason, in the WP-Profiles section, users are NOT allowed to edit their main username, but they can edit their display name, which is fine… But, in the BP Profiles section, the users can simply change their login username to anything they want. This will obviously lead to database errors and people changing their usernames to cause conflicts.
So, this I consider is a major security risk, and there is no way to stop regular non admins from changing their usernames in the BP Profiles. Hey, at least WP got it right, by not allowing it…
I’m not sure why the code listed above didn’t work for me. I have a totally different theme called, “Darkpress theme 1.1.”. But, I edited the functions.php file in both the themes directory and in the bp-themes where the themes are located. Because, there are actually two of the same themes located in two totally different directorys on the site. As there should be.
But, I’m not sure if this code was suppose to go into an existing plugin or create it is as a plugin, as I tried an empty .txt file and copied the code listed above then uploaded it as a .php mu-plugin. But, that didn’t work, it honestly didn’t even recognize the code. Nor, did it change anything.
So, does anyone have any ideas of how to STOP people from being able to change their “LOGIN Username” from being edited within the BP-PRESS profiles edit areas.
One more thing, the WP-Registration profiles that request for new username and e-mail address, show up above the BP-PRESS profile questions and it also asks for the username. So, on the same registration page, you have two questions requesting for what their username is going to be. This is quite ridiculous, and so far their is no way to shut that part off. Does anyone have any ideas? This is quite frusterating… As, the regisration page should only ask one time for a username, but it seems that the BP-PRESS profiles is also asking for it.
And yes if you fill out a different username for the WP-Registration username field versus the BP-Registration username field, the BP-Username field that was filled out will out win the WP-Registred username field.
I am so confused, how do I fix this???