That function should do what you want. Are you sure the error is not elsewhere?
You can also try using the get_user_by()
(source) function:
$user = get_user_by('login', 'MaryJane');
This is the same as get_userdatabylogin('MaryJane');
That function should do what you want. Are you sure the error is not elsewhere?
You can also try using the get_user_by()
(source) function:
$user = get_user_by('login', 'MaryJane');
This is the same as get_userdatabylogin('MaryJane');