Should wrap up the base landing page stuff for accounts, next step is server rendering

This commit is contained in:
Dane Everitt 2017-08-30 21:11:14 -05:00
parent 67ac36f5ce
commit e045ef443a
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
32 changed files with 1223 additions and 317 deletions

View file

@ -50,21 +50,6 @@ class User extends Model implements
{
use Authenticatable, Authorizable, CanResetPassword, Eloquence, Notifiable, Validable;
/**
* The rules for user passwords.
*
* @var string
* @deprecated
*/
const PASSWORD_RULES = 'regex:((?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{8,})';
/**
* The regex rules for usernames.
*
* @var string
*/
const USERNAME_RULES = 'regex:/^([\w\d\.\-]{1,255})$/';
/**
* Level of servers to display when using access() on a user.
*
@ -92,9 +77,9 @@ class User extends Model implements
* @var array
*/
protected $casts = [
'root_admin' => 'integer',
'use_totp' => 'integer',
'gravatar' => 'integer',
'root_admin' => 'boolean',
'use_totp' => 'boolean',
'gravatar' => 'boolean',
];
/**
@ -135,11 +120,11 @@ class User extends Model implements
* @var array
*/
protected static $applicationRules = [
'email' => 'required|email',
'username' => 'required|alpha_dash',
'name_first' => 'required|string',
'name_last' => 'required|string',
'password' => 'sometimes|regex:((?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{8,})',
'email' => 'required',
'username' => 'required',
'name_first' => 'required',
'name_last' => 'required',
'password' => 'sometimes',
];
/**
@ -148,10 +133,10 @@ class User extends Model implements
* @var array
*/
protected static $dataIntegrityRules = [
'email' => 'unique:users,email',
'username' => 'between:1,255|unique:users,username',
'name_first' => 'between:1,255',
'name_last' => 'between:1,255',
'email' => 'email|unique:users,email',
'username' => 'alpha_dash|between:1,255|unique:users,username',
'name_first' => 'string|between:1,255',
'name_last' => 'string|between:1,255',
'password' => 'nullable|string',
'root_admin' => 'boolean',
'language' => 'string|between:2,5',