This repository has been archived on 2025-02-26. You can view files and clone it, but cannot push or open issues or pull requests.
szurubooru/src/Models/Entities/TokenEntity.php
2014-05-05 17:47:30 +02:00

23 lines
347 B
PHP

<?php
class TokenEntity extends AbstractEntity implements IValidatable
{
public $userId;
public $token;
public $used;
public $expires;
public function validate()
{
//todo
}
public function getUser()
{
return UserModel::findById($this->userId);
}
public function setUser($user)
{
$this->userId = $user ? $user->id : null;
}
}