Add UserList
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
using System.Web.Mvc;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Security;
|
||||
using Hangfire;
|
||||
using LeafWeb.WebCms.Models;
|
||||
@@ -6,6 +8,7 @@ using LeafWeb.WebCms.Services;
|
||||
using log4net;
|
||||
using MlkPwgen;
|
||||
using Umbraco.Core;
|
||||
using Umbraco.Web.Mvc;
|
||||
|
||||
namespace LeafWeb.WebCms.Controllers
|
||||
{
|
||||
@@ -208,5 +211,17 @@ namespace LeafWeb.WebCms.Controllers
|
||||
|
||||
return Redirect(redirectUrl);
|
||||
}
|
||||
|
||||
[MemberAuthorize(AllowGroup = "Administrator")]
|
||||
public ActionResult UserList()
|
||||
{
|
||||
var emails
|
||||
= from li in DataService.GetLeafInputs()
|
||||
group li by li.Email
|
||||
into emailGroup
|
||||
select new { emailGroup.Key, emailGroup.FirstOrDefault().Name };
|
||||
|
||||
return View(emails.ToList().Select(e => new Tuple<string, string>(e.Name, e.Key)));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user