We can add a user defined variable to a thread group.In this we can give some name/value pairs. It is similar to adding users and values in test Plan itself.
We can then access them in a a req name by using a notion like ${username}.Please note that username is case sensitive.So the case has to be the same that we gave in our testplan/user defined variable.
Also note that if we have same username in test plan and user defined variable and if we want to access them in any req then the variable which is defined in user defined variable will be accessed.