Commit ee76fe4a authored by catch's avatar catch

Issue #2624822 by chgasparoto, Lars Toomre, markdorison, anish.a,...

Issue #2624822 by chgasparoto, Lars Toomre, markdorison, anish.a, joshi.rohit100, Mile23, alexpott: Remove unused variables in user.module
parent 8a1341ac
......@@ -100,7 +100,6 @@ public function buildForm(array $form, FormStateInterface $form_state) {
'#value' => $role_names,
);
// Render role/permission overview:
$options = array();
$hide_descriptions = system_admin_compact_mode();
$form['system_compact_link'] = array(
......@@ -145,7 +144,6 @@ public function buildForm(array $form, FormStateInterface $form_state) {
'restrict access' => FALSE,
'warning' => !empty($perm_item['restrict access']) ? $this->t('Warning: Give to trusted roles only; this permission has security implications.') : '',
);
$options[$perm] = $perm_item['title'];
$form['permissions'][$perm]['description'] = array(
'#type' => 'inline_template',
'#template' => '<div class="permission"><span class="title">{{ title }}</span>{% if description or warning %}<div class="description">{% if warning %}<em class="permission-warning">{{ warning }}</em> {% endif %}{{ description }}</div>{% endif %}</div>',
......@@ -158,7 +156,6 @@ public function buildForm(array $form, FormStateInterface $form_state) {
$form['permissions'][$perm]['description']['#context']['description'] = $perm_item['description'];
$form['permissions'][$perm]['description']['#context']['warning'] = $perm_item['warning'];
}
$options[$perm] = '';
foreach ($role_names as $rid => $name) {
$form['permissions'][$perm][$rid] = array(
'#title' => $name . ': ' . $perm_item['title'],
......
......@@ -174,8 +174,8 @@ function testNotificationEmailAddress() {
->save();
// Register a new user account.
$edit = array();
$edit['name'] = $name = $this->randomMachineName();
$edit['mail'] = $mail = $edit['name'] . '@example.com';
$edit['name'] = $this->randomMachineName();
$edit['mail'] = $edit['name'] . '@example.com';
$this->drupalPostForm('user/register', $edit, t('Create new account'));
$subject = 'Account details for ' . $edit['name'] . ' at ' . $system->get('name') . ' (pending admin approval)';
// Ensure that admin notification mail is sent to the configured
......
......@@ -135,7 +135,7 @@ protected function buildAccountForm($operation) {
$entity = $this->container->get('entity.manager')
->getStorage($entity_type)
->create($fields);
$form_object = $this->container->get('entity.manager')
$this->container->get('entity.manager')
->getFormObject($entity_type, $operation)
->setEntity($entity);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment