baserCMS クラスリファレンス

User extends Entity
in package

Class User

Table of Contents

Properties

$created  : Time
$email  : string
$id  : int
$modified  : Time
$name  : string
$nickname  : string
$password  : string
$real_name_1  : string
$real_name_2  : string
$status  : bool
$_accessible  : array<string|int, mixed>
Accessible
$_hidden  : array<string|int, mixed>
Hidden

Methods

getAuthPrefixes()  : array<string|int, mixed>
認証領域のプレフィックスを配列で取得する
getDisplayName()  : string
整形されたユーザー名を取得する
isAddableToAdminGroup()  : bool
システム管理グループにユーザーを追加可能かどうか判定する
isAdmin()  : bool
管理ユーザーかどうか判定する
isDeletableUser()  : bool
対象ユーザーに対して削除可能かどうか判定する
isEditableUser()  : bool
対象ユーザーに対して編集可能かどうか判定する
isEnableLoginAgent()  : bool
対象ユーザーに対して代理ログイン可能かどうか判定する
isSuper()  : bool
スーパーユーザーかどうか判定する
_setPassword()  : bool|string
Set Password

Properties

$created

public Time $created

$email

public string $email

$modified

public Time $modified

$name

public string $name

$nickname

public string $nickname

$password

public string $password

$real_name_1

public string $real_name_1

$real_name_2

public string $real_name_2

$status

public bool $status

$_accessible

Accessible

protected array<string|int, mixed> $_accessible = ['*' => true, 'id' => false]

$_hidden

Hidden

protected array<string|int, mixed> $_hidden = ['password']

Methods

getAuthPrefixes()

認証領域のプレフィックスを配列で取得する

public getAuthPrefixes() : array<string|int, mixed>
Tags
checked
noTodo
Return values
array<string|int, mixed>

getDisplayName()

整形されたユーザー名を取得する

public getDisplayName() : string
Tags
checked
noTodo
unitTest
Return values
string

isAddableToAdminGroup()

システム管理グループにユーザーを追加可能かどうか判定する

public isAddableToAdminGroup() : bool

利用可能条件

  • 自身がスーパーユーザーで対象がスーパーユーザーでない場合
  • 自身がシステム管理ユーザーで対象がシステム管理ユーザーでない場合
Tags
checked
noTodo
Return values
bool

isAdmin()

管理ユーザーかどうか判定する

public isAdmin() : bool
Tags
checked
noTodo
unitTest
Return values
bool

isDeletableUser()

対象ユーザーに対して削除可能かどうか判定する

public isDeletableUser(EntityInterface|User $targetUser) : bool

利用可能条件

  • 自身がスーパーユーザーで対象がスーパーユーザーでない場合
  • 自身がシステム管理ユーザーで対象がシステム管理ユーザーでない場合
Parameters
$targetUser : EntityInterface|User
Tags
checked
noTodo
Return values
bool

isEditableUser()

対象ユーザーに対して編集可能かどうか判定する

public isEditableUser(EntityInterface|User $targetUser) : bool

利用可能条件

  • 自身がスーパーユーザーの場合無条件に可
  • 自身に対しての変更は可
  • 相手がシステム管理ユーザーでない場合は可(アクセスルールで制御)
Parameters
$targetUser : EntityInterface|User
Tags
checked
noTodo
Return values
bool

isEnableLoginAgent()

対象ユーザーに対して代理ログイン可能かどうか判定する

public isEnableLoginAgent(EntityInterface|User $targetUser) : bool

利用可能条件

  • 対象ユーザーのステータスが有効であること
  • 自身がスーパーユーザーで対象がスーパーユーザーでない場合
  • 自身がシステム管理ユーザーで対象がシステム管理ユーザーでない場合
Parameters
$targetUser : EntityInterface|User
Tags
checked
noTodo
Return values
bool

isSuper()

スーパーユーザーかどうか判定する

public isSuper() : bool
Tags
checked
noTodo
Return values
bool

_setPassword()

Set Password

protected _setPassword( $value) : bool|string
Parameters
$value :
Tags
checked
noTodo
unitTest
Return values
bool|string

        
On this page

Search results