BEdita API doc | 4-cactus
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Download

Namespaces

  • BEdita
    • API
      • Auth
      • Controller
        • Admin
        • Component
        • Model
      • Error
      • Event
      • Exception
      • Middleware
      • Model
        • Action
      • Network
        • Exception
      • Shell
      • TestSuite
      • Utility
    • Core
      • Configure
        • Engine
      • Database
        • Type
      • Exception
      • Filesystem
        • Adapter
        • Exception
        • Thumbnail
      • I18n
      • Job
        • Service
      • Mailer
        • Preview
        • Transport
      • Model
        • Action
        • Behavior
        • Entity
        • Table
        • Validation
      • ORM
        • Inheritance
        • Locator
        • Rule
      • Shell
        • Task
      • State
      • TestSuite
        • Fixture
      • Utility

Classes

  • Database
  • JsonSchema
  • LoggedUser
  • System
  • Text

Interfaces

  • JsonApiSerializable

Class LoggedUser

Singleton class representing currently logged user.

User information is retained to be used to save objects, check permissions, update analytics.

BEdita\Core\Utility\LoggedUser uses BEdita\Core\SingletonTrait
Namespace: BEdita\Core\Utility
Since: 4.0.0
Located at Core/src/Utility/LoggedUser.php

Methods summary

public static array
# getUser( )

Read singleton current user data.

Read singleton current user data.

Returns

array
public static integer|null
# id( )

Read from singleton current user ID.

Read from singleton current user ID.

Returns

integer|null
Logged user ID, or null if no current user is set.
public static
# setUser( array $userData )

Set singleton current user data.

Set singleton current user data.

Parameters

$userData
User data array.
public static
# resetUser( )

Reset singleton current user data.

Reset singleton current user data.

Methods used from BEdita\Core\SingletonTrait

__clone(), __construct(), getInstance()

Properties summary

private array $userData

User data MUST contain at least user 'id' as array key.

User data MUST contain at least user 'id' as array key.

Valid examples: - ['id' => 1] - ['id' => 1, 'username' => 'bedita']

# []

Properties used from BEdita\Core\SingletonTrait

$uniqueInstance

BEdita API doc | 4-cactus API documentation generated by ApiGen