Users are created whith name in upper case on my site, but some admin want to display it in lower case. I had a custom field in user profile to identified those admin, but I don't know what hook I can use to change last_name case before it's displaying.

I tried "pre_user_query" in order to change SQL request width LOWER(last_name) but meta hare not directly accessible.

Is someone has an idea ?

2 Answers 2


Hard to say without seeing any code as to how you are building it out but one suggestion would be to update the field on submit prior to running your register_new_user function.

PHP strtolower() Function can be used when passing the data to your custom field

Javascript/jQuery you can use .toLowerCase() on the field


Thanks for your response But I can change case on submit because for the most part of user the case is correct. For some admin only, I need lower case. I don't find any code to make this. I think about a hook triggered after request on database and before displaying.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.