]> git.pld-linux.org Git - packages/drupal.git/blob - drupal-disabled_fields.patch
- drop old triggers
[packages/drupal.git] / drupal-disabled_fields.patch
1 --- drupal-4.6.8/modules/user.module    2006-03-13 23:29:18.000000000 +0200
2 +++ /usr/share/drupal/modules/user.module       2006-07-05 01:09:17.183413371 +0300
3 @@ -1046,8 +1046,10 @@
4  function user_edit_form($uid, $edit) {
5    // Account information:
6    $group  = form_textfield(t('Username'), 'name', $edit['name'], 30, 55, t('Your full name or your preferred username: only letters, numbers and spaces are allowed.'), NULL, TRUE);
7 +  if (user_access('administer user fields')) {
8    $group .= form_textfield(t('E-mail address'), 'mail', $edit['mail'], 30, 55, t('Insert a valid e-mail address.  All e-mails from the system will be sent to this address. The e-mail address is not made public and will only be used if you wish to receive a new password or wish to receive certain news or notifications by e-mail.'), NULL, TRUE);
9    $group .= form_item(t('Password'), '<input type="password" class="form-password" name="edit[pass1]" size="12" maxlength="24" /> <input type="password" class="form-password" name="edit[pass2]" size="12" maxlength="24" />', t('Enter your new password twice if you want to change your current password, or leave it blank if you are happy with your current password.'), NULL, TRUE);
10 +  }
11  
12    if (user_access('administer users')) {
13      $group .= form_radios(t('Status'), 'status', $edit['status'], array(t('Blocked'), t('Active')));
14 @@ -1082,6 +1084,7 @@
15      form_set_error('name', t('The name %name has been denied access.', array('%name' => theme('placeholder', $edit['name']))));
16    }
17  
18 +  if (user_access('administer user fields')) {
19    // Validate the e-mail address:
20    if ($error = user_validate_mail($edit['mail'])) {
21      form_set_error('mail', $error);
22 @@ -1092,6 +1095,7 @@
23    else if (user_deny('mail', $edit['mail'])) {
24      form_set_error('mail', t('The e-mail address %email has been denied access.', array('%email' => theme('placeholder', $edit['mail']))));
25    }
26 +  }
27  
28    // Validate the user roles:
29    if (user_access('administer users')) {
This page took 0.04503 seconds and 3 git commands to generate.