mirror of
https://github.com/flarum/core.git
synced 2025-10-13 07:54:25 +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:
@@ -30,6 +30,7 @@ class UserSerializer extends UserBasicSerializer
|
||||
$canEdit = $user->can($actorUser, 'edit');
|
||||
|
||||
$attributes += [
|
||||
'bioHtml' => $user->bioHtml,
|
||||
'joinTime' => $user->join_time ? $user->join_time->toRFC3339String() : null,
|
||||
'lastSeenTime' => $user->last_seen_time ? $user->last_seen_time->toRFC3339String() : null,
|
||||
'discussionsCount' => (int) $user->discussions_count,
|
||||
@@ -40,6 +41,7 @@ class UserSerializer extends UserBasicSerializer
|
||||
|
||||
if ($canEdit) {
|
||||
$attributes += [
|
||||
'bio' => $user->bio,
|
||||
'isActivated' => $user->is_activated,
|
||||
'email' => $user->email,
|
||||
'isConfirmed' => $user->is_confirmed
|
||||
|
Reference in New Issue
Block a user