When deleting user accounts through user/uid/delete, three errors show up:

    * warning: Missing argument 1 for user_edit() in /path/modules/user/user.module on line 1690.
    * warning: htmlspecialchars() expects parameter 1 to be string, array given in /path/includes/bootstrap.inc on line 663.

and (3), the description is displayed as Array

The attached patch fixes these issues.

CommentFileSizeAuthor
user_module_delete.patch1.08 KBDriesK

Comments

dries’s picture

  $items['user/%user/delete'] = array(
    'title' => 'Delete',
    'page callback' => 'user_edit',
    'access callback' => 'user_access',
    'access arguments' => array('administer users'),
    'type' => MENU_CALLBACK,
  );

  $items['user/%user/edit'] = array(
    'title' => 'Edit',
    'page callback' => 'drupal_get_form',
    'page arguments' => array('user_edit'),
    'access callback' => 'user_edit_access',
    'access arguments' => array(1),
    'type' => MENU_LOCAL_TASK,
  );

There seem to be two menu handlers that match -- one through drupal_get_form() and one direct. I think this patch might fix the latter, but could break the former. Might need a little bit more investigation.

asimmonds’s picture

Status: Needs review » Needs work

The user_edit() part of this patch should be fixed properly with removing the deletion code from user_edit() and moving it to a form submit handler.

The second hunk is similar to a ignored patch that I submitted for CNR at:
http://drupal.org/node/156796#comment-270162

asimmonds’s picture

Status: Needs work » Closed (duplicate)

pwolanin has attacked this in the other issue:
http://drupal.org/node/156796