Disabling user nickname changes, problem when registering.
-
Hello, I have manged to stop users from chaning their nicknames on the BP profile by adding this code to bp custom.
// No name changes Man function disable_name_change( $data ) { if ( 1 == $data->field_id ) $data->field_id = false; return $data; } add_action( 'xprofile_data_before_save', 'disable_name_change' ); // No name changes Man over
The problem is that now when a user registers the nickname is not saved in the DB, only username is, so the code above it’s stopping users from even setting their first nickname, not only changing it, any solutions?
- The topic ‘Disabling user nickname changes, problem when registering.’ is closed to new replies.