Mercurial > hg > cmmr2012-drupal-site
comparison core/modules/user/src/AccountSettingsForm.php @ 5:12f9dff5fda9 tip
Update to Drupal core 8.7.1
author | Chris Cannam |
---|---|
date | Thu, 09 May 2019 15:34:47 +0100 |
parents | a9cd425dd02b |
children |
comparison
equal
deleted
inserted
replaced
4:a9cd425dd02b | 5:12f9dff5fda9 |
---|---|
149 $form['registration_cancellation']['user_register'] = [ | 149 $form['registration_cancellation']['user_register'] = [ |
150 '#type' => 'radios', | 150 '#type' => 'radios', |
151 '#title' => $this->t('Who can register accounts?'), | 151 '#title' => $this->t('Who can register accounts?'), |
152 '#default_value' => $config->get('register'), | 152 '#default_value' => $config->get('register'), |
153 '#options' => [ | 153 '#options' => [ |
154 USER_REGISTER_ADMINISTRATORS_ONLY => $this->t('Administrators only'), | 154 UserInterface::REGISTER_ADMINISTRATORS_ONLY => $this->t('Administrators only'), |
155 USER_REGISTER_VISITORS => $this->t('Visitors'), | 155 UserInterface::REGISTER_VISITORS => $this->t('Visitors'), |
156 USER_REGISTER_VISITORS_ADMINISTRATIVE_APPROVAL => $this->t('Visitors, but administrator approval is required'), | 156 UserInterface::REGISTER_VISITORS_ADMINISTRATIVE_APPROVAL => $this->t('Visitors, but administrator approval is required'), |
157 ], | 157 ], |
158 ]; | 158 ]; |
159 $form['registration_cancellation']['user_email_verification'] = [ | 159 $form['registration_cancellation']['user_email_verification'] = [ |
160 '#type' => 'checkbox', | 160 '#type' => 'checkbox', |
161 '#title' => $this->t('Require email verification when a visitor creates an account'), | 161 '#title' => $this->t('Require email verification when a visitor creates an account'), |
201 $email_token_help = $this->t('Available variables are: [site:name], [site:url], [user:display-name], [user:account-name], [user:mail], [site:login-url], [site:url-brief], [user:edit-url], [user:one-time-login-url], [user:cancel-url].'); | 201 $email_token_help = $this->t('Available variables are: [site:name], [site:url], [user:display-name], [user:account-name], [user:mail], [site:login-url], [site:url-brief], [user:edit-url], [user:one-time-login-url], [user:cancel-url].'); |
202 | 202 |
203 $form['email_admin_created'] = [ | 203 $form['email_admin_created'] = [ |
204 '#type' => 'details', | 204 '#type' => 'details', |
205 '#title' => $this->t('Welcome (new user created by administrator)'), | 205 '#title' => $this->t('Welcome (new user created by administrator)'), |
206 '#open' => $config->get('register') == USER_REGISTER_ADMINISTRATORS_ONLY, | 206 '#open' => $config->get('register') == UserInterface::REGISTER_ADMINISTRATORS_ONLY, |
207 '#description' => $this->t('Edit the welcome email messages sent to new member accounts created by an administrator.') . ' ' . $email_token_help, | 207 '#description' => $this->t('Edit the welcome email messages sent to new member accounts created by an administrator.') . ' ' . $email_token_help, |
208 '#group' => 'email', | 208 '#group' => 'email', |
209 ]; | 209 ]; |
210 $form['email_admin_created']['user_mail_register_admin_created_subject'] = [ | 210 $form['email_admin_created']['user_mail_register_admin_created_subject'] = [ |
211 '#type' => 'textfield', | 211 '#type' => 'textfield', |
221 ]; | 221 ]; |
222 | 222 |
223 $form['email_pending_approval'] = [ | 223 $form['email_pending_approval'] = [ |
224 '#type' => 'details', | 224 '#type' => 'details', |
225 '#title' => $this->t('Welcome (awaiting approval)'), | 225 '#title' => $this->t('Welcome (awaiting approval)'), |
226 '#open' => $config->get('register') == USER_REGISTER_VISITORS_ADMINISTRATIVE_APPROVAL, | 226 '#open' => $config->get('register') == UserInterface::REGISTER_VISITORS_ADMINISTRATIVE_APPROVAL, |
227 '#description' => $this->t('Edit the welcome email messages sent to new members upon registering, when administrative approval is required.') . ' ' . $email_token_help, | 227 '#description' => $this->t('Edit the welcome email messages sent to new members upon registering, when administrative approval is required.') . ' ' . $email_token_help, |
228 '#group' => 'email', | 228 '#group' => 'email', |
229 ]; | 229 ]; |
230 $form['email_pending_approval']['user_mail_register_pending_approval_subject'] = [ | 230 $form['email_pending_approval']['user_mail_register_pending_approval_subject'] = [ |
231 '#type' => 'textfield', | 231 '#type' => 'textfield', |
241 ]; | 241 ]; |
242 | 242 |
243 $form['email_pending_approval_admin'] = [ | 243 $form['email_pending_approval_admin'] = [ |
244 '#type' => 'details', | 244 '#type' => 'details', |
245 '#title' => $this->t('Admin (user awaiting approval)'), | 245 '#title' => $this->t('Admin (user awaiting approval)'), |
246 '#open' => $config->get('register') == USER_REGISTER_VISITORS_ADMINISTRATIVE_APPROVAL, | 246 '#open' => $config->get('register') == UserInterface::REGISTER_VISITORS_ADMINISTRATIVE_APPROVAL, |
247 '#description' => $this->t('Edit the email notifying the site administrator that there are new members awaiting administrative approval.') . ' ' . $email_token_help, | 247 '#description' => $this->t('Edit the email notifying the site administrator that there are new members awaiting administrative approval.') . ' ' . $email_token_help, |
248 '#group' => 'email', | 248 '#group' => 'email', |
249 ]; | 249 ]; |
250 $form['email_pending_approval_admin']['register_pending_approval_admin_subject'] = [ | 250 $form['email_pending_approval_admin']['register_pending_approval_admin_subject'] = [ |
251 '#type' => 'textfield', | 251 '#type' => 'textfield', |
261 ]; | 261 ]; |
262 | 262 |
263 $form['email_no_approval_required'] = [ | 263 $form['email_no_approval_required'] = [ |
264 '#type' => 'details', | 264 '#type' => 'details', |
265 '#title' => $this->t('Welcome (no approval required)'), | 265 '#title' => $this->t('Welcome (no approval required)'), |
266 '#open' => $config->get('register') == USER_REGISTER_VISITORS, | 266 '#open' => $config->get('register') == UserInterface::REGISTER_VISITORS, |
267 '#description' => $this->t('Edit the welcome email messages sent to new members upon registering, when no administrator approval is required.') . ' ' . $email_token_help, | 267 '#description' => $this->t('Edit the welcome email messages sent to new members upon registering, when no administrator approval is required.') . ' ' . $email_token_help, |
268 '#group' => 'email', | 268 '#group' => 'email', |
269 ]; | 269 ]; |
270 $form['email_no_approval_required']['user_mail_register_no_approval_required_subject'] = [ | 270 $form['email_no_approval_required']['user_mail_register_no_approval_required_subject'] = [ |
271 '#type' => 'textfield', | 271 '#type' => 'textfield', |