UserServiceGetUserIdByEmailAsync Method

由指定邮箱地址获取对应用户 Id。

Definition

Namespace: QuickAdmin.Service.Admin
Assembly: QuickAdmin.Net (in QuickAdmin.Net.dll) Version: 2.0.11
C#
public virtual Task<IServiceResult<long>> GetUserIdByEmailAsync(
	string email,
	CancellationToken cancellationToken = default
)

Parameters

email  string
要查找的邮箱地址。
cancellationToken  CancellationToken  (Optional)
用于取消操作的令牌。

Return Value

TaskIServiceResultlong
Data 为找到的用户 Id 的服务调用结果。
当未找到时,返回的 Code404,有重复记录时,返回的 Code300

Implements

IUserServiceGetUserIdByEmailAsync(string, CancellationToken)

Remarks

方法内会查是否有重复记录,但没有检查传入的邮箱地址是否有效。
注意此方法可能返回超管用户,即同时在系统用户数据表和超管用户数据表里查找。

See Also