Undefined variable user

Issue with undefined variable user.