/// <summary> /// Validates if user exists with key. /// </summary> /// <param name="key">User sign in key.</param> /// <returns>User profile.</returns> public static ProfileModel ValidateUser(string key) { Dictionary <string, ProfileModel> profiles = SQLManager.GetProfiles(); foreach (string dictKey in profiles.Keys) { if (key.Equals(profiles[dictKey].Key)) { return(profiles[dictKey]); } } return(null); }
/// <summary> /// Simple method that sets _profiles to /// all the retrieved profiles from the sql /// database /// </summary> public static void LoadProfiles() { _profiles = SQLManager.GetProfiles(); }