mirror of
https://github.com/OPSnet/Gazelle.git
synced 2026-01-17 03:04:47 -05:00
24 lines
484 B
PHP
24 lines
484 B
PHP
<?php
|
|
/** @phpstan-var \Gazelle\User $Viewer */
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Gazelle;
|
|
|
|
$user = new Manager\User()->findById((int)$_GET['userid']);
|
|
if (is_null($user)) {
|
|
Error403::error();
|
|
}
|
|
if ($user->id !== $Viewer->id && !$Viewer->permitted('users_mod')) {
|
|
Error403::error();
|
|
}
|
|
authorize();
|
|
|
|
new Manager\Notification()->push(
|
|
[$user->id],
|
|
'Push!',
|
|
"You have been pushed by {$Viewer->username()}",
|
|
);
|
|
|
|
header("Location: {$user->location()}&action=edit");
|