/**
* Remove the photo from a user.
*
* @param int $UserID
*/
public function removePicture($UserID)
{
// Grab the current photo.
$User = $this->getID($UserID, DATASET_TYPE_ARRAY);
$Photo = $User['Photo'];
// Only attempt to delete a physical file, not a URL.
if (!isUrl($Photo)) {
$ProfilePhoto = changeBasename($Photo, 'p%s');
$Upload = new Gdn_Upload();
$Upload->delete($ProfilePhoto);
}
// Wipe the Photo field.
$this->setField($UserID, 'Photo', null);
}