Adds default avatar image
parent
f0f7d5b2d3
commit
d2f4850d28
|
@ -26,6 +26,10 @@ return [
|
||||||
// default is ../app/jilo-web.db
|
// default is ../app/jilo-web.db
|
||||||
'sqlite_file' => '../app/jilo-web.db',
|
'sqlite_file' => '../app/jilo-web.db',
|
||||||
],
|
],
|
||||||
|
// avatars path
|
||||||
|
'avatars_path' => 'uploads/avatars/',
|
||||||
|
// default avatar
|
||||||
|
'default_avatar' => 'static/default_avatar.png',
|
||||||
// system info
|
// system info
|
||||||
'version' => '0.2',
|
'version' => '0.2',
|
||||||
// development has verbose error messages, production has not
|
// development has verbose error messages, production has not
|
||||||
|
|
|
@ -30,6 +30,7 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') {
|
||||||
// no form submitted, show the templates
|
// no form submitted, show the templates
|
||||||
} else {
|
} else {
|
||||||
$userDetails = $userObject->getUserDetails($user);
|
$userDetails = $userObject->getUserDetails($user);
|
||||||
|
$avatar = !empty($userDetails['avatar']) ? 'uploads/avatars/'.$userDetails['avatar'] : $config['default_avatar'];
|
||||||
|
|
||||||
switch ($action) {
|
switch ($action) {
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,9 @@
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<div class="border" style="width:200px; height: 200px;"><img src="" alt="avatar" /></div>
|
<div class="border" style="width:200px; height: 200px;">
|
||||||
|
<img src="<?= $app_root . htmlspecialchars($avatar) ?>" width="200" height="200" alt="avatar" />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 43 KiB |
Loading…
Reference in New Issue