1
This commit is contained in:
@@ -3,6 +3,7 @@ namespace BLL
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.ServiceModel.Security;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
public static class UserService
|
||||
@@ -390,6 +391,27 @@ namespace BLL
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据用户Id判断用户是否有维护邮箱,返回姓名
|
||||
/// </summary>
|
||||
/// <param name="userId"></param>
|
||||
/// <returns></returns>
|
||||
public static bool IsUserHaveEmail(string userId, out string userName)
|
||||
{
|
||||
bool result = false;
|
||||
userName = string.Empty;
|
||||
if (!string.IsNullOrWhiteSpace(userId))
|
||||
{
|
||||
var user = (from x in Funs.DB.Sys_User where x.UserId == userId select x).FirstOrDefault();
|
||||
if (user != null)
|
||||
{
|
||||
result = !string.IsNullOrWhiteSpace(user.Email);
|
||||
userName = user.UserName;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据用户Id获取用户邮箱
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user