This commit is somehow result of merge with user_management branch.

This commit is contained in:
Michal Kváček
2016-01-21 11:17:17 +01:00
parent da13c15604
commit 012e150519
11 changed files with 216 additions and 4 deletions
+24
View File
@@ -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');
}
}
}