Removed restoreDefaultAvatar method

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2024-07-20 07:25:27 +01:00
parent 241eb7b031
commit 6f3eedf5e6

View file

@ -412,25 +412,5 @@ class Setting extends Model
} }
} }
/**
* Copy the default avatar back over if it's missing
*
* @return string
**/
public static function restoreDefaultAvatar() : void {
if (Storage::disk('public')->missing(public_path('uploads/avatars/default.png'))) {
\Log::debug('default avatar not found');
try {
Storage::disk('public')->copy(public_path('img/demo/avatars/default.png'), public_path('uploads/avatars/default.png'));
\Log::debug('Default avatar copied back over from img/demo/default.png');
} catch (\Exception $e) {
\Log::debug('Could not copy default avatar. Error: '.$e);
}
}
}
} }