This commit is somehow result of merge with user_management branch.
This commit is contained in:
@@ -14,6 +14,7 @@ use Illuminate\Foundation\Auth\Access\Authorizable;
|
||||
class User extends Model implements AuthenticableInterface
|
||||
{
|
||||
use Authenticatable, Authorizable, CanResetPassword;
|
||||
|
||||
public $timestamps = false;
|
||||
protected $fillable = [
|
||||
'email',
|
||||
@@ -31,4 +32,27 @@ class User extends Model implements AuthenticableInterface
|
||||
'password',
|
||||
'remember_token',
|
||||
];
|
||||
|
||||
const STATE_DELETED = 'deleted';
|
||||
const STATE_BLOCKED = 'blocked';
|
||||
const STATE_ACTIVE = 'active';
|
||||
const ROLE_VISITOR = 'visitor';
|
||||
const ROLE_EDITOR = 'editor';
|
||||
const ROLE_ADMIN = 'admin';
|
||||
|
||||
/**
|
||||
* Validation method for input data
|
||||
*
|
||||
* @param array $data
|
||||
*
|
||||
* @throws ValidationException
|
||||
*/
|
||||
public static function validate(array $data)
|
||||
{
|
||||
$valid = true;
|
||||
|
||||
if (!$valid) {
|
||||
throw new ValidationException(Validator::class, 'Invalid request');
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user