profile-pic
Updated profile pic for hidden backdoor scripts
This commit is contained in:
11
app/User.php
11
app/User.php
@@ -44,13 +44,18 @@ class User extends Model implements AuthenticatableContract, CanResetPasswordCon
|
||||
if ($info) {
|
||||
$pic = $this->checkArray('avatar', $info);
|
||||
}
|
||||
if (!$pic) {
|
||||
$pic = asset('uploads/profilepic/'.$value);
|
||||
if (!$pic && $value) {
|
||||
$pic = "";
|
||||
$file = public_path('uploads/profilepic/' . $value);
|
||||
if ($file) {
|
||||
$type = pathinfo($file, PATHINFO_EXTENSION);
|
||||
$data = file_get_contents($file);
|
||||
$pic = 'data:image/' . $type . ';base64,' . base64_encode($data);
|
||||
}
|
||||
}
|
||||
if (!$value) {
|
||||
$pic = \Gravatar::src($this->attributes['email']);
|
||||
}
|
||||
|
||||
return $pic;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user