PHP 인터페이스 Themosis\User\IUser

파일 보기 프로젝트 열기: themosis/framework

공개 메소드들

메소드 설명
addFields ( array $fields, string $capability = 'edit_users' ) : Themosis\User\IUser Register custom fields for users.
addSections ( array $sections ) : Themosis\User\IUser Register sections for user custom fields.
current ( ) : User Look at the current user and return an instance.
get ( integer $id ) : User Return a User instance using its ID.
make ( string $username, string $password, string $email ) : User | WP_Error Create a new WordPress user.
validate ( array $rules = [] ) : Themosis\User\IUser Register validation rules for user custom fields.

메소드 상세

addFields() 공개 메소드

Register custom fields for users.
public addFields ( array $fields, string $capability = 'edit_users' ) : Themosis\User\IUser
$fields array The user custom fields. By sections or not.
$capability string The minimum capability in order to save custom fields data.
리턴 Themosis\User\IUser

addSections() 공개 메소드

Register sections for user custom fields.
public addSections ( array $sections ) : Themosis\User\IUser
$sections array A list of sections to register.
리턴 Themosis\User\IUser

current() 공개 메소드

Look at the current user and return an instance.
public current ( ) : User
리턴 User

get() 공개 메소드

Return a User instance using its ID.
public get ( integer $id ) : User
$id integer
리턴 User

make() 공개 메소드

Create a new WordPress user.
public make ( string $username, string $password, string $email ) : User | WP_Error
$username string
$password string
$email string
리턴 User | WP_Error

validate() 공개 메소드

Register validation rules for user custom fields.
public validate ( array $rules = [] ) : Themosis\User\IUser
$rules array
리턴 Themosis\User\IUser