I am using profile2 module for user profiles and created a profile with first name and last name fields which are used for configuring real name. And I have set real name as page title. But there is machine name being displayed if the first name and last name fields are empty. I want to set user name to the first name field until the profile fields are filled. is there anyone who knows the solution?
1 Answer
use form alter for alter profile2 fields name, then put pass uid load user using userload function get username put this value as default value for the first name field in your profile 2 form ..