function imagepicker_delete_olduser_dirs in Image Picker 7
Same name and namespace in other branches
- 6.2 imagepicker.admin.inc \imagepicker_delete_olduser_dirs()
1 call to imagepicker_delete_olduser_dirs()
File
- ./
imagepicker.admin.inc, line 1376 - @author Bob Hutchinson http://drupal.org/user/52366 @copyright GNU GPL
Code
function imagepicker_delete_olduser_dirs($old_uid) {
$OK = FALSE;
// $old_uid might not exist in users table but still have images
$old_userdir = array(
'uid' => $old_uid,
);
$source = imagepicker_get_path(FALSE, $old_userdir);
$source_thumbsdir = $source . IMAGEPICKER_THUMBS_DIR;
$source_browserdir = $source . IMAGEPICKER_BROWSER_DIR;
$source_origdir = $source . IMAGEPICKER_ORIG_DIR;
$OK = drupal_rmdir($source_origdir);
$OK = drupal_rmdir($source_browserdir);
$OK = drupal_rmdir($source_thumbsdir);
$OK = drupal_rmdir($source);
return $OK;
}