Set password operational
Sitewide plan for status messages
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlTypes;
|
||||
using System.Linq;
|
||||
using System.Linq.Expressions;
|
||||
using System.Text.RegularExpressions;
|
||||
@@ -471,6 +470,14 @@ namespace MileageTraker.Web.DAL
|
||||
UpdateUser(original);
|
||||
}
|
||||
|
||||
public void UpdateUserPassword(Guid userId, string password)
|
||||
{
|
||||
var user = GetUser(userId);
|
||||
user.Password = Crypto.HashPassword(password);
|
||||
user.LastPasswordChangedDate = DateTime.Now;
|
||||
UpdateUser(user);
|
||||
}
|
||||
|
||||
public void UpdateUserLastActivity(string username)
|
||||
{
|
||||
var user = FindUserByUsername(username);
|
||||
@@ -505,13 +512,5 @@ namespace MileageTraker.Web.DAL
|
||||
{
|
||||
return _db.Roles;
|
||||
}
|
||||
|
||||
public Role GetRoleByName(string roleName)
|
||||
{
|
||||
return
|
||||
(from role in _db.Roles
|
||||
where roleName == role.RoleName
|
||||
select role).FirstOrDefault();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user