Apply fixes from StyleCI

This commit is contained in:
Manish Verma
2017-05-23 10:18:08 +00:00
committed by StyleCI Bot
parent 4ec6000d69
commit 7b8ee415be
8 changed files with 91 additions and 68 deletions

View File

@@ -45,17 +45,18 @@ class User extends Model implements AuthenticatableContract, CanResetPasswordCon
$pic = $this->checkArray('avatar', $info);
}
if (!$pic && $value) {
$pic = "";
$file = asset('uploads/profilepic/' . $value);
$pic = '';
$file = asset('uploads/profilepic/'.$value);
if ($file) {
$type = pathinfo($file, PATHINFO_EXTENSION);
$data = file_get_contents($file);
$pic = 'data:image/' . $type . ';base64,' . base64_encode($data);
$pic = 'data:image/'.$type.';base64,'.base64_encode($data);
}
}
if (!$value) {
$pic = \Gravatar::src($this->attributes['email']);
}
return $pic;
}