mirror of
https://github.com/flarum/core.git
synced 2025-10-19 02:36:08 +02:00
- In order to be consistent with the Ember/LESS naming scheme, renamed Flarum\Web to Flarum\Forum. - Moved common classes into Flarum\Support so that Flarum\Admin doesn’t depend on Flarum\Forum. Also moved Actor into Flarum\Support as it doesn’t belong in the domain.
24 lines
348 B
PHP
Executable File
24 lines
348 B
PHP
Executable File
<?php namespace Flarum\Support;
|
|
|
|
use Flarum\Core\Models\Guest;
|
|
|
|
class Actor
|
|
{
|
|
protected $user;
|
|
|
|
public function getUser()
|
|
{
|
|
return $this->user ?: new Guest;
|
|
}
|
|
|
|
public function setUser($user)
|
|
{
|
|
$this->user = $user;
|
|
}
|
|
|
|
public function isAuthenticated()
|
|
{
|
|
return (bool) $this->user;
|
|
}
|
|
}
|