1
0
mirror of https://github.com/flarum/core.git synced 2025-10-19 02:36:08 +02:00
Files
php-flarum/src/Support/Actor.php
Toby Zerner 6898e0acbb Refactor Flarum\Web and Flarum\Admin
- 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.
2015-03-30 16:17:04 +10:30

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;
}
}