Skip to content

Commit cec01d3

Browse files
committed
Fixed image exporting
1 parent 6a6987f commit cec01d3

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

app/Http/Controllers/UserController.php

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1096,17 +1096,6 @@ public function exportAll(Request $request)
10961096

10971097
$userData = $user->toArray();
10981098
$userData['links'] = $links->toArray();
1099-
1100-
function findAvatar($name){
1101-
$directory = base_path('assets/img');
1102-
$files = scandir($directory);
1103-
$pathinfo = "error.error";
1104-
foreach($files as $file) {
1105-
if (strpos($file, $name.'.') !== false) {
1106-
$pathinfo = "/img/" . $name. "." . pathinfo($file, PATHINFO_EXTENSION);
1107-
}}
1108-
return $pathinfo;
1109-
}
11101099

11111100
if (file_exists(base_path(findAvatar($userId)))){
11121101
$imagePath = base_path(findAvatar($userId));

0 commit comments

Comments
 (0)