GetUsersByName() public method

Return the List of all UserName
public GetUsersByName ( string userName ) : UserEntity>.IDictionary
userName string
return UserEntity>.IDictionary
        public string Register(UserDetails data)
        {
            if (data == null || string.IsNullOrEmpty(data.UserId))
            {
                return "ERROR";
            }

            // Validate the details before storing it in DB
            // Encrypt the password before storing it in DB
            try
            {
                JavaScriptSerializer json = new JavaScriptSerializer();
                TableManager tblMgr = new TableManager();

                IDictionary<string, UserEntity> users = tblMgr.GetUsersByName(data.UserId);
                if (users != null && users.Count > 0)
                {
                    return "OK";
                }

                if (data != null)
                {
                    UserEntity user = new UserEntity();
                    user.UserName = data.UserId;
                    user.Password = string.IsNullOrEmpty(data.UserType) ? GetHashPassword(data.Password) : data.Country; // Country field is having the access token
                    user.City = string.IsNullOrEmpty(data.City) ? string.Empty : data.City;
                    user.Created_At = DateTime.Now;
                    user.DateOfBirth = string.IsNullOrEmpty(data.DateOfBirth) ? string.Empty : data.DateOfBirth;
                    user.Email = data.Email;
                    //user.Country = string.IsNullOrEmpty(data.Country) ? string.Empty : data.Country;
                    user.Profile_Pic_Http = string.IsNullOrEmpty(data.ProfilePic) ? string.Empty : data.ProfilePic;
                    user.Profile_Pic_Https = string.IsNullOrEmpty(data.SecureProfilePic) ? string.Empty : data.SecureProfilePic;
                    user.FirstName = data.FirstName;
                    user.Gender = string.IsNullOrEmpty(data.Gender) ? string.Empty : data.Gender;
                    user.LastName = data.LastName;
                    user.Mobile = string.IsNullOrEmpty(data.UserType) ? string.Empty : data.Mobile;
                    user.UserId = user.RowKey = Guid.NewGuid().ToString();
                    user.UserType = string.IsNullOrEmpty(data.UserType) ? "Application" : data.UserType;
                    user.Status = 1;

                    tblMgr.UpdateUserById(user);
                }
            }
            catch (Exception ex)
            {
                return "ERROR";
            }

            return "OK";
        }