[AVATAR] Fixed avatar upload, added avatar inline download and updated template and base controller

This commit is contained in:
Hugo Sales
2020-08-08 16:10:25 +00:00
committed by Hugo Sales
parent 2bf914f96f
commit bd8f4bd277
13 changed files with 303 additions and 97 deletions

View File

@@ -35,8 +35,9 @@ namespace App\Util;
use App\Core\DB\DB;
use App\Core\Router;
use App\Core\Security;
use App\Entity\LocalUser;
use App\Entity\Profile;
use Functional as F;
use Symfony\Component\Security\Core\User\UserInterface;
abstract class Common
{
@@ -69,11 +70,16 @@ abstract class Common
DB::flush();
}
public static function user(): UserInterface
public static function user(): LocalUser
{
return Security::getUser();
}
public static function profile(): Profile
{
return self::user()->getProfile();
}
/**
* Is the given string identical to a system path or route?
* This could probably be put in some other class, but at