forked from GNUsocial/gnu-social
[AVATAR] Fixed avatar upload, added avatar inline download and updated template and base controller
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user