GetUser() public méthode

Gets a user by userId
public GetUser ( int userId ) : UserInfo
userId int Id of the user to get.
Résultat Ru.GameSchool.DataLayer.Repository.UserInfo
        public override string[] GetRolesForUser(string username)
        {
            UserService userService = new UserService();

            var user = userService.GetUser(username);

            return new[] {((UserType) user.UserTypeId).ToString()};
        }
        public override MembershipUser GetUser(object providerUserKey, bool userIsOnline)
        {
            UserService userService = new UserService();

            var user = userService.GetUser((int)providerUserKey);

            var membershipUser = new GameSchoolMembershipUser("GameSchoolMembershipProvider", user.Username, user.UserInfoId, user.Email, string.Empty,
                                                     string.Empty, true, false, user.CreateDateTime, DateTime.Now,
                                                     DateTime.Now, DateTime.Now, DateTime.Now, user.Fullname, user.UserInfoId, user.UserTypeId);

            return membershipUser;
        }
        public override bool IsUserInRole(string username, string roleName)
        {
            UserService userService = new UserService();

            var user = userService.GetUser(username);

            if (user != null)
            {
                if (user.UserTypeId == (int)UserTypeResolver.Get(roleName))
                { 
                    return true;
                }
            }
            return false;
        }