User
User
A User represents any authenticated user of the Vendure API. This includes both Administrators as well as registered Customers.
Signature
class User extends VendureEntity implements HasCustomFields, SoftDeletable {
constructor(input?: DeepPartial<User>)
@Column({ type: Date, nullable: true }) @Column({ type: Date, nullable: true })
deletedAt: Date | null;
@Column() @Column()
identifier: string;
@OneToMany(type => AuthenticationMethod, method => method.user) @OneToMany(type => AuthenticationMethod, method => method.user)
authenticationMethods: AuthenticationMethod[];
@Column({ default: false }) @Column({ default: false })
verified: boolean;
@ManyToMany(type => Role) @JoinTable() @ManyToMany(type => Role)
@JoinTable()
roles: Role[];
@Column({ type: Date, nullable: true }) @Column({ type: Date, nullable: true })
lastLogin: Date | null;
@Column(type => CustomUserFields) @Column(type => CustomUserFields)
customFields: CustomUserFields;
getNativeAuthenticationMethod() => NativeAuthenticationMethod;
getNativeAuthenticationMethod(strict?: boolean) => NativeAuthenticationMethod | undefined;
getNativeAuthenticationMethod(strict?: boolean) => NativeAuthenticationMethod | undefined;
}
Extends
Implements
- HasCustomFields
- SoftDeletable
Members
constructor
method
type:
(input?: DeepPartial<User>) => User
deletedAt
property
type:
Date | null
identifier
property
type:
string
authenticationMethods
property
type:
AuthenticationMethod[]
verified
property
type:
boolean
roles
property
type:
Role[]
lastLogin
property
type:
Date | null
customFields
property
type:
CustomUserFields
getNativeAuthenticationMethod
method
type:
() => NativeAuthenticationMethod
getNativeAuthenticationMethod
method
type:
(strict?: boolean) => NativeAuthenticationMethod | undefined
getNativeAuthenticationMethod
method
type:
(strict?: boolean) => NativeAuthenticationMethod | undefined