mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Remove a lot of deprecated code.
This commit is contained in:
22
app/User.php
22
app/User.php
@@ -219,28 +219,6 @@ class User extends Authenticatable
|
||||
return (string)bin2hex($bytes);
|
||||
}
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
* Checks if the user has a role by its name.
|
||||
*
|
||||
* Full credit goes to: https://github.com/Zizaco/entrust
|
||||
*
|
||||
* @param string $name
|
||||
*
|
||||
* @deprecated
|
||||
* @return bool
|
||||
*/
|
||||
public function hasRole(string $name): bool
|
||||
{
|
||||
foreach ($this->roles as $role) {
|
||||
if ($role->name === $name) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
* Link to import jobs.
|
||||
|
Reference in New Issue
Block a user