forked from craftcms/cms
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUserLockedException.php
More file actions
48 lines (43 loc) · 1004 Bytes
/
Copy pathUserLockedException.php
File metadata and controls
48 lines (43 loc) · 1004 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<?php
/**
* @link https://craftcms.com/
* @copyright Copyright (c) Pixel & Tonic, Inc.
* @license https://craftcms.github.io/license/
*/
namespace craft\errors;
use craft\elements\User;
use Throwable;
use yii\base\Exception;
/**
* Class UserLockedException
*
* @author Pixel & Tonic, Inc. <support@pixelandtonic.com>
* @since 3.1.7
*/
class UserLockedException extends Exception
{
/**
* @var User The user that's locked.
*/
public User $user;
/**
* Constructor
*
* @param User $user
* @param string $message
* @param int $code
* @param Throwable|null $previous
*/
public function __construct(User $user, string $message = '', int $code = 0, ?Throwable $previous = null)
{
$this->user = $user;
parent::__construct($message, $code, $previous);
}
/**
* @return string the user-friendly name of this exception
*/
public function getName(): string
{
return 'User locked';
}
}