for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* UserCallable.php
*
* @copyright More in license.md
* @license https://www.ipublikuj.eu
* @author Adam Kadlec <[email protected]>
* @package iPublikuj:DoctrineBlameable!
* @subpackage Security
* @since 1.0.0
* @date 05.01.16
*/
declare(strict_types = 1);
namespace IPub\DoctrineBlameable\Security;
use Nette\Security as NS;
* Doctrine blameable default user callable
final class UserCallable
{
* @var NS\User
private $user;
* @param NS\User $user
public function __construct(NS\User $user)
$this->user = $user;
}
* @return mixed
public function __invoke()
if ($this->user->isLoggedIn()) {
return $this->user->getId();
return NULL;