2 using System
.Collections
.Generic
;
5 using System
.Web
.Security
;
6 using PumpkinHouseDatabase
;
7 using PumpkinHouse
.Utils
;
11 public class MembershipProvider
: SqlMembershipProvider
13 public override bool ValidateUser(string email
, string password
)
15 string username
= Helper
.ValidateUser(email
, password
);
18 string returnUrl
= HttpContext
.Current
.Request
.Params
["ReturnUrl"];
19 HttpContext
.Current
.Session
["username"] = username
;
21 if (Roles
.IsUserInRole(username
, "locked"))
23 HttpContext
.Current
.Response
.Redirect("/Account/AccountLocked.aspx");
31 return username
!= null;
34 public override MembershipUserCollection
GetAllUsers(int pageIndex
, int pageSize
, out int totalRecords
)
36 using (DataUtils utils
= new DataUtils(false))
38 IQueryable
<DB_User
> users
= utils
.FindAllUsers();
39 totalRecords
= users
.Count();
40 IList
<MembershipUser
> result
= users
.Skip(pageSize
* pageIndex
).Take(pageSize
).Select(u
=> new MembershipUser("AspNetSqlMembershipProvider",
52 DateTime
.Now
)).ToList();
53 MembershipUserCollection c
= new MembershipUserCollection();
54 foreach (MembershipUser u
in result
)