Changeset View
Changeset View
Standalone View
Standalone View
src/app/User.php
<?php | <?php | ||||
namespace App; | namespace App; | ||||
use App\Entitlement; | use App\Entitlement; | ||||
use App\UserAlias; | use App\UserAlias; | ||||
use App\Sku; | use App\Sku; | ||||
use App\Traits\UuidIntKeyTrait; | |||||
use App\Traits\UserConfigTrait; | use App\Traits\UserConfigTrait; | ||||
use App\Traits\UserAliasesTrait; | use App\Traits\UserAliasesTrait; | ||||
use App\Traits\SettingsTrait; | use App\Traits\SettingsTrait; | ||||
use App\Wallet; | use App\Wallet; | ||||
use Illuminate\Database\Eloquent\SoftDeletes; | use Illuminate\Database\Eloquent\SoftDeletes; | ||||
use Illuminate\Support\Facades\Hash; | use Illuminate\Support\Facades\Hash; | ||||
use Illuminate\Foundation\Auth\User as Authenticatable; | use Illuminate\Foundation\Auth\User as Authenticatable; | ||||
use Iatstuti\Database\Support\NullableFields; | use Iatstuti\Database\Support\NullableFields; | ||||
use Laravel\Passport\HasApiTokens; | use Laravel\Passport\HasApiTokens; | ||||
use League\OAuth2\Server\Exception\OAuthServerException; | use League\OAuth2\Server\Exception\OAuthServerException; | ||||
/** | /** | ||||
* The eloquent definition of a User. | * The eloquent definition of a User. | ||||
* | * | ||||
* @property string $email | * @property string $email | ||||
* @property int $id | * @property int $id | ||||
* @property string $password | * @property string $password | ||||
* @property int $status | * @property int $status | ||||
* @property int $tenant_id | * @property int $tenant_id | ||||
*/ | */ | ||||
class User extends Authenticatable | class User extends Authenticatable | ||||
{ | { | ||||
use UuidIntKeyTrait; | |||||
use NullableFields; | use NullableFields; | ||||
use UserConfigTrait; | use UserConfigTrait; | ||||
use UserAliasesTrait; | use UserAliasesTrait; | ||||
use SettingsTrait; | use SettingsTrait; | ||||
use SoftDeletes; | use SoftDeletes; | ||||
use HasApiTokens; | use HasApiTokens; | ||||
// a new user, default on creation | // a new user, default on creation | ||||
public const STATUS_NEW = 1 << 0; | public const STATUS_NEW = 1 << 0; | ||||
// it's been activated | // it's been activated | ||||
public const STATUS_ACTIVE = 1 << 1; | public const STATUS_ACTIVE = 1 << 1; | ||||
// user has been suspended | // user has been suspended | ||||
public const STATUS_SUSPENDED = 1 << 2; | public const STATUS_SUSPENDED = 1 << 2; | ||||
// user has been deleted | // user has been deleted | ||||
public const STATUS_DELETED = 1 << 3; | public const STATUS_DELETED = 1 << 3; | ||||
// user has been created in LDAP | // user has been created in LDAP | ||||
public const STATUS_LDAP_READY = 1 << 4; | public const STATUS_LDAP_READY = 1 << 4; | ||||
// user mailbox has been created in IMAP | // user mailbox has been created in IMAP | ||||
public const STATUS_IMAP_READY = 1 << 5; | public const STATUS_IMAP_READY = 1 << 5; | ||||
// change the default primary key type | |||||
public $incrementing = false; | |||||
protected $keyType = 'bigint'; | |||||
/** | /** | ||||
* The attributes that are mass assignable. | * The attributes that are mass assignable. | ||||
* | * | ||||
* @var array | * @var array | ||||
*/ | */ | ||||
protected $fillable = [ | protected $fillable = [ | ||||
'id', | 'id', | ||||
'email', | 'email', | ||||
▲ Show 20 Lines • Show All 851 Lines • Show Last 20 Lines |