1 | <?php |
||
7 | class SAMLLoginForm extends LoginForm |
||
|
|||
8 | { |
||
9 | /** |
||
10 | * This field is used in the "You are logged in as %s" message |
||
11 | * @var string |
||
12 | */ |
||
13 | public $loggedInAsField = 'FirstName'; |
||
14 | |||
15 | /** |
||
16 | * @var string |
||
17 | */ |
||
18 | protected $authenticator_class = 'SAMLAuthenticator'; |
||
19 | |||
20 | /** |
||
21 | * Constructor |
||
22 | * |
||
23 | * @param Controller $controller |
||
24 | * @param string $name method on the $controller |
||
25 | * @param FieldList $fields |
||
26 | * @param FieldList $actions |
||
27 | * @param bool $checkCurrentUser - show logout button if logged in |
||
28 | */ |
||
29 | public function __construct($controller, $name, $fields = null, $actions = null, $checkCurrentUser = true) |
||
65 | |||
66 | |||
67 | /** |
||
68 | * |
||
69 | * |
||
70 | * @return bool |
||
71 | */ |
||
72 | protected function shouldShowLogoutFields() |
||
82 | |||
83 | /** |
||
84 | * Get message from session |
||
85 | */ |
||
86 | protected function getMessageFromSession() |
||
102 | |||
103 | |||
104 | /** |
||
105 | * Login form handler method |
||
106 | * |
||
107 | * This method is called when the user clicks on "Log in" |
||
108 | * |
||
109 | * @param array $data Submitted data |
||
110 | */ |
||
111 | public function dologin($data) |
||
115 | |||
116 | |||
117 | /** |
||
118 | * Log out form handler method |
||
119 | * |
||
120 | * This method is called when the user clicks on "logout" on the form |
||
121 | * created when the parameter <i>$checkCurrentUser</i> of the |
||
122 | * {@link __construct constructor} was set to TRUE and the user was |
||
123 | * currently logged in. |
||
124 | */ |
||
125 | public function logout() |
||
130 | } |
||
131 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.