You are here

function imagecache_profiles_user in ImageCache Profiles 6

Implements hook_user().

Flush imagecache picture if user is updating their account picture.

File

./imagecache_profiles.module, line 260

Code

function imagecache_profiles_user($op, &$edit, &$account, $category = NULL) {
  if ($op == 'submit' && $category == 'account') {
    if ($edit['picture_delete']) {
      imagecache_image_flush($account->picture);
    }
    if (isset($edit['picture'])) {
      imagecache_image_flush($edit['picture']);
    }
  }
  elseif ($op == 'delete' && isset($account->picture)) {
    imagecache_image_flush($account->picture);
  }
}