You are here

function _user_edit_submit in Drupal 4

Same name and namespace in other branches
  1. 5 modules/user/user.module \_user_edit_submit()
  2. 6 modules/user/user.module \_user_edit_submit()
1 call to _user_edit_submit()
user_user in modules/user.module
Implementation of hook_user().

File

modules/user.module, line 1386
Enables the user registration and login system.

Code

function _user_edit_submit($uid, &$edit) {
  $user = user_load(array(
    'uid' => $uid,
  ));

  // Delete picture if requested, and if no replacement picture was given.
  if ($edit['picture_delete']) {
    if ($user->picture && file_exists($user->picture)) {
      file_delete($user->picture);
    }
    $edit['picture'] = '';
  }
  if (isset($edit['roles'])) {
    $edit['roles'] = array_filter($edit['roles']);
  }
}