Show / Hide Table of Contents

Class CurrentUser

Inheritance
object
CurrentUser
Implements
ICurrentUser
ITransientDependency
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: Volo.Abp.Users
Assembly: Volo.Abp.Security.dll
Syntax
public class CurrentUser : ICurrentUser, ITransientDependency

Constructors

CurrentUser(ICurrentPrincipalAccessor)

Declaration
public CurrentUser(ICurrentPrincipalAccessor principalAccessor)
Parameters
Type Name Description
ICurrentPrincipalAccessor principalAccessor

Properties

Email

Declaration
public virtual string? Email { get; }
Property Value
Type Description
string

EmailVerified

Declaration
public virtual bool EmailVerified { get; }
Property Value
Type Description
bool

Id

Declaration
public virtual Guid? Id { get; }
Property Value
Type Description
Guid?

IsAuthenticated

Declaration
public virtual bool IsAuthenticated { get; }
Property Value
Type Description
bool

Name

Declaration
public virtual string? Name { get; }
Property Value
Type Description
string

PhoneNumber

Declaration
public virtual string? PhoneNumber { get; }
Property Value
Type Description
string

PhoneNumberVerified

Declaration
public virtual bool PhoneNumberVerified { get; }
Property Value
Type Description
bool

Roles

Declaration
public virtual string[] Roles { get; }
Property Value
Type Description
string[]

SurName

Declaration
public virtual string? SurName { get; }
Property Value
Type Description
string

TenantId

Declaration
public virtual Guid? TenantId { get; }
Property Value
Type Description
Guid?

UserName

Declaration
public virtual string? UserName { get; }
Property Value
Type Description
string

Methods

FindClaim(string)

Declaration
public virtual Claim? FindClaim(string claimType)
Parameters
Type Name Description
string claimType
Returns
Type Description
Claim

FindClaims(string)

Declaration
public virtual Claim[] FindClaims(string claimType)
Parameters
Type Name Description
string claimType
Returns
Type Description
Claim[]

GetAllClaims()

Declaration
public virtual Claim[] GetAllClaims()
Returns
Type Description
Claim[]

IsInRole(string)

Declaration
public virtual bool IsInRole(string roleName)
Parameters
Type Name Description
string roleName
Returns
Type Description
bool

Implements

ICurrentUser
ITransientDependency

Extension Methods

AbpObjectExtensions.As<T>(object)
AbpObjectExtensions.To<T>(object)
LockExtensions.Locking(object, Action)
LockExtensions.Locking<TResult>(object, Func<TResult>)
AbpObjectExtensions.If<T>(T, bool, Action<T>)
AbpObjectExtensions.If<T>(T, bool, Func<T, T>)
AbpObjectExtensions.IsIn<T>(T, IEnumerable<T>)
AbpObjectExtensions.IsIn<T>(T, params T[])
AbpQueryableExtensions.OrderByIf<T, TQueryable>(TQueryable, bool, string)
AbpQueryableExtensions.PageBy<T, TQueryable>(TQueryable, int, int)
AbpQueryableExtensions.WhereIf<T, TQueryable>(TQueryable, bool, Expression<Func<T, bool>>)
AbpQueryableExtensions.WhereIf<T, TQueryable>(TQueryable, bool, Expression<Func<T, int, bool>>)
AbpOpenIddictQueryableExtensions.SkipIf<T, TQueryable>(TQueryable, bool, int?)
AbpOpenIddictQueryableExtensions.TakeIf<T, TQueryable>(TQueryable, bool, int?)
LockExtensions.Locking<T>(T, Action<T>)
LockExtensions.Locking<T, TResult>(T, Func<T, TResult>)
CurrentUserExtensions.FindClaimValue(ICurrentUser, string)
CurrentUserExtensions.FindClaimValue<T>(ICurrentUser, string)
CurrentUserExtensions.FindImpersonatorTenantId(ICurrentUser)
CurrentUserExtensions.FindImpersonatorTenantName(ICurrentUser)
CurrentUserExtensions.FindImpersonatorUserId(ICurrentUser)
CurrentUserExtensions.FindImpersonatorUserName(ICurrentUser)
CurrentUserExtensions.FindSessionId(ICurrentUser)
CurrentUserExtensions.GetId(ICurrentUser)
CurrentUserExtensions.GetSessionId(ICurrentUser)
In this article
Back to top Powered by ABP.IO Platform