Create User works
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
using System.Web.Mvc;
|
||||
using MileageTraker.Web.DAL;
|
||||
|
||||
namespace MileageTraker.Web.Attributes
|
||||
{
|
||||
public class UserActivityAttribute : ActionFilterAttribute
|
||||
{
|
||||
public override void OnActionExecuting(ActionExecutingContext filterContext)
|
||||
{
|
||||
if (filterContext != null)
|
||||
{
|
||||
using (var ds = new DataService())
|
||||
{
|
||||
ds.UpdateUserLastActivity(filterContext.HttpContext.User.Identity.Name);
|
||||
}
|
||||
}
|
||||
base.OnActionExecuting(filterContext);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user