Explorar o código

bug fix : disable user_register_alter for administrators

Signed-off-by: bachy <git@g-u-i.net>
bachy %!s(int64=12) %!d(string=hai) anos
pai
achega
438ebb75ad
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      materio_user.module

+ 1 - 1
materio_user.module

@@ -77,7 +77,7 @@ function materio_user_block_view($delta = '') {
  */
 function materio_user_form_alter(&$form, &$form_state, $form_id) {
   // dsm($form_id);
-  if($form_id == "user_register_form" ){
+  if( $form_id == "user_register_form" && !user_access('administer users') ){
     // dsm($form);
     $form['account']['pass']['#type'] = 'password';
     $form['account']['pass']['#title'] = t('Password');