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) {
|
if ($info) {
|
||||||
$pic = $this->checkArray('avatar', $info);
|
$pic = $this->checkArray('avatar', $info);
|
||||||
}
|
}
|
||||||
if (!$pic) {
|
if (!$pic && $value) {
|
||||||
$pic = asset('uploads/profilepic/'.$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) {
|
if (!$value) {
|
||||||
$pic = \Gravatar::src($this->attributes['email']);
|
$pic = \Gravatar::src($this->attributes['email']);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $pic;
|
return $pic;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user