I have the user-signup disabled on my Drupal 7 website. Only the administrator can create accounts.
I want to add custom fields for a user depending on the role the user has been assigned by the administrator.Now I want to add some fields to the registration system that depend to the role that the admin chosen.
eg: If the admin has created a user account with role A and another account with role B. When the users log-in, user A should be asked to enter phone number whereas the second user should be asked to enter home address.
I tried profile2 module but I could not achieve what I wanted.