/// <summary> /// /// </summary> /// <param name="username"></param> /// <returns></returns> public override string[] GetRolesForUser(string username) { if (!HttpContext.Current.User.Identity.IsAuthenticated) { return(null); } var userRoles = new string[] { }; var selectedUser = AuthenticationDB.GetUserRolesByEmail(username); if (selectedUser != null) { userRoles = new[] { selectedUser.Select(r => r.RoleName).ToString() }; } return(userRoles.ToArray()); }