mirror of
https://github.com/flarum/core.git
synced 2025-10-18 10:16:09 +02:00
Implement user "bio" field
Perhaps this should be an extension, but it is pretty essential and I can’t think of many instances where it wouldn’t be wanted. Would be very easy to extract later on if need be.
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
<?php namespace Flarum\Core\Handlers\Commands;
|
||||
|
||||
use Flarum\Core\Repositories\UserRepositoryInterface as UserRepository;
|
||||
use Flarum\Core\Events\UserWillBeSaved;
|
||||
use Flarum\Core\Support\DispatchesEvents;
|
||||
|
||||
class EditUserCommandHandler
|
||||
{
|
||||
@@ -29,6 +31,9 @@ class EditUserCommandHandler
|
||||
if (isset($command->password)) {
|
||||
$userToEdit->changePassword($command->password);
|
||||
}
|
||||
if (isset($command->bio)) {
|
||||
$userToEdit->changeBio($command->bio);
|
||||
}
|
||||
if (! empty($command->readTime)) {
|
||||
$userToEdit->markAllAsRead();
|
||||
}
|
||||
|
Reference in New Issue
Block a user