In the user.module implementation of hook_user (user_user) there is the code:

  if ($type == 'submit' && $category == 'account') {
    return _user_edit_submit(arg(1), $edit);
  }

But according to the documentation http://api.drupal.org/api/4.7/function/hook_user $type cannot be "submit". Should that case be removed? Or should the documentation be updated? Or is this something else...?

Comments

ax’s picture

Title: Unused code in user.module » update documentation for hook_user, op 'submit'
Category: task » bug

not unused code, but documentation that hasn't been updated. the relevant patch is here.

magico’s picture

Version: 4.7.3 » 4.7.4

Where is the "core.php" file to change this documentation?
I need just to had the following: "submit": Modify the account before it gets saved.

edmund.kwok’s picture

Status: Active » Fixed

Committed an update to core.php, http://drupal.org/cvs?commit=43817. Would take a while before the documentation are updated. Until then, considering this fixed, thanks.

Anonymous’s picture

Status: Fixed » Closed (fixed)