You are here

function _user_edit_submit in Drupal 6

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

File

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

Code

function _user_edit_submit($uid, &$edit) {
  $account = user_load($uid);

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