Added user object to obtain username

The user object instance was not in else option.