mirror of
https://github.com/flarum/core.git
synced 2025-10-28 05:56:12 +01:00
Make existing extensions compatible with new stack
This commit is contained in:
@@ -12,7 +12,12 @@
|
||||
namespace Flarum\User\Exception;
|
||||
|
||||
use Exception;
|
||||
use Flarum\Foundation\KnownError;
|
||||
|
||||
class InvalidConfirmationTokenException extends Exception
|
||||
class InvalidConfirmationTokenException extends Exception implements KnownError
|
||||
{
|
||||
public function getType(): string
|
||||
{
|
||||
return 'invalid_confirmation_token';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,11 +12,12 @@
|
||||
namespace Flarum\User\Exception;
|
||||
|
||||
use Exception;
|
||||
use Flarum\Foundation\KnownError;
|
||||
|
||||
class PermissionDeniedException extends Exception
|
||||
class PermissionDeniedException extends Exception implements KnownError
|
||||
{
|
||||
public function __construct($message = null, $code = 403, Exception $previous = null)
|
||||
public function getType(): string
|
||||
{
|
||||
parent::__construct($message, $code, $previous);
|
||||
return 'permission_denied';
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user