增加登陆逻辑,如果开启,只需要去掉basecontroller中的注释就行

This commit is contained in:
yubaolee
2015-11-30 17:44:42 +08:00
parent afceafb00c
commit b91156e06b
12 changed files with 310 additions and 256 deletions

View File

@@ -1,7 +1,7 @@
using System;
using System.Collections.Generic;
using OpenAuth.Domain;
using OpenAuth.Domain.Interface;
using System;
using Infrastructure.Helper;
using OpenAuth.Domain;
namespace OpenAuth.App
{
@@ -16,15 +16,14 @@ namespace OpenAuth.App
public void Login(string userName, string password)
{
var user = _repository.FindSingle(u =>u.Account ==userName);
var user = _repository.FindSingle(u => u.Account == userName);
if (user == null)
{
throw new Exception("<22>û<EFBFBD><C3BB>ʺŲ<CABA><C5B2><EFBFBD><EFBFBD><EFBFBD>");
}
// user.CheckLogin(password);
user.CheckPassword(password);
SessionHelper.AddSessionUser(user);
}
}
}