user side of contracts
This commit is contained in:
23
app/User.php
23
app/User.php
@@ -37,17 +37,6 @@ class User extends Authenticatable
|
||||
|
||||
protected $table = 'users';
|
||||
|
||||
/**
|
||||
* The attributes that should be hidden for arrays.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $hidden = [
|
||||
'password', 'remember_token',
|
||||
];
|
||||
|
||||
protected $guarded = [];
|
||||
|
||||
public function getUserType() {
|
||||
return User::where('user_type')->get();
|
||||
}
|
||||
@@ -79,10 +68,6 @@ class User extends Authenticatable
|
||||
return false;
|
||||
}
|
||||
|
||||
public function tickets() {
|
||||
return $this->hasMany('App\Models\HelpDesk\HelpDeskTicket', 'character_id');
|
||||
}
|
||||
|
||||
public function hasEsiScope($scope) {
|
||||
$found = EsiScope::where(['character_id' => $this->character_id, 'scope' => $scope])->get(['scope']);
|
||||
if(isset($found[0]->scope) && $found[0]->scope == $scope) {
|
||||
@@ -117,4 +102,12 @@ class User extends Authenticatable
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public function getName() {
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
public function getId() {
|
||||
return $this->character_id;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user