Set password operational

Sitewide plan for status messages
This commit is contained in:
2012-12-29 20:41:50 -05:00
parent ce6fd9c215
commit 8739251066
32 changed files with 332 additions and 144 deletions
+8 -9
View File
@@ -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();
}
}
}