1
0
mirror of https://github.com/flarum/core.git synced 2025-10-18 18:26:07 +02:00

Consolidate avatar uploading, allow avatarUrl to be used when updating user

This commit is contained in:
Toby Zerner
2017-10-07 17:39:27 +10:30
parent 87bf84ef6e
commit 2dbcfe02d8
7 changed files with 143 additions and 121 deletions

View File

@@ -12,6 +12,7 @@
namespace Flarum\Event;
use Flarum\Core\User;
use Intervention\Image\Image;
class AvatarWillBeSaved
{
@@ -30,21 +31,21 @@ class AvatarWillBeSaved
public $actor;
/**
* The path to the avatar that will be saved.
* The image that will be saved.
*
* @var string
* @var Image
*/
public $path;
public $image;
/**
* @param User $user The user whose avatar will be saved.
* @param User $actor The user performing the action.
* @param string $path The path to the avatar that will be saved.
* @param Image $image The image that will be saved.
*/
public function __construct(User $user, User $actor, $path)
public function __construct(User $user, User $actor, Image $image)
{
$this->user = $user;
$this->actor = $actor;
$this->path = $path;
$this->image = $image;
}
}