summaryrefslogtreecommitdiff
path: root/modules/user.module
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2006-02-09 08:20:49 +0000
committerDries Buytaert <dries@buytaert.net>2006-02-09 08:20:49 +0000
commitc6328111a3127706ba514059eb76fa249e660f21 (patch)
treec48e21d3d38168ee80e4cb3ac514ff19ab54aa06 /modules/user.module
parentb67cce5a8fee268b1ea1b1b4a5691ae56e2769da (diff)
downloadbrdo-c6328111a3127706ba514059eb76fa249e660f21.tar.gz
brdo-c6328111a3127706ba514059eb76fa249e660f21.tar.bz2
- Patch #48242 by markus: add/edit form in user access rules is broken.
Diffstat (limited to 'modules/user.module')
-rw-r--r--modules/user.module6
1 files changed, 4 insertions, 2 deletions
diff --git a/modules/user.module b/modules/user.module
index db35fd027..86e63e43e 100644
--- a/modules/user.module
+++ b/modules/user.module
@@ -1530,17 +1530,19 @@ function _user_admin_access_form($edit) {
'#default_value' => 0,
'#options' => array('1' => t('Allow'), '0' => t('Deny')),
);
+ $type_options = array('user' => t('Username'), 'mail' => t('E-mail'), 'host' => t('Host'));
$form['type'] = array(
'#type' => 'radios',
'#title' => t('Rule type'),
- '#default_value' => 'user',
- '#options' => array('user' => t('Username'), 'mail' => t('E-mail'), 'host' => t('Host')),
+ '#default_value' => (isset($type_options[$edit['type']]) ? $edit['type'] : 'user'),
+ '#options' => $type_options,
);
$form['mask'] = array(
'#type' => 'textfield',
'#title' => t('Mask'),
'#size' => 30,
'#maxlength' => 64,
+ '#default_value' => $edit['mask'],
'#description' => '%: '. t('Matches any number of characters, even zero characters') .'.<br />_: '. t('Matches exactly one character.'),
'#required' => TRUE,
);