mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-11-30 04:33:41 +08:00
a72bd75e3a
Many pages were missing their unique tab/page titles so this change is just to distribute them back over many common areas where they were missing.
31 lines
811 B
PHP
31 lines
811 B
PHP
<?php
|
|
|
|
namespace BookStack\Http\Controllers;
|
|
|
|
use BookStack\Actions\ActivityQueries;
|
|
use BookStack\Auth\UserRepo;
|
|
|
|
class UserProfileController extends Controller
|
|
{
|
|
/**
|
|
* Show the user profile page.
|
|
*/
|
|
public function show(UserRepo $repo, ActivityQueries $activities, string $slug)
|
|
{
|
|
$user = $repo->getBySlug($slug);
|
|
|
|
$userActivity = $activities->userActivity($user);
|
|
$recentlyCreated = $repo->getRecentlyCreated($user, 5);
|
|
$assetCounts = $repo->getAssetCounts($user);
|
|
|
|
$this->setPageTitle($user->name);
|
|
|
|
return view('users.profile', [
|
|
'user' => $user,
|
|
'activity' => $userActivity,
|
|
'recentlyCreated' => $recentlyCreated,
|
|
'assetCounts' => $assetCounts,
|
|
]);
|
|
}
|
|
}
|