Files
pterodactyl-panel/app/Contracts/Users/UpdatesUsers.php
T

26 lines
739 B
PHP
Raw Normal View History

2026-10-05 18:10:18 -04:00
<?php
declare(strict_types=1);
namespace Pterodactyl\Contracts\Users;
use Pterodactyl\Models\User;
use Throwable;
interface UpdatesUsers
{
/**
* Update the user model instance and return the updated model. The hashed
* password cast on the model takes care of hashing a new password.
*
2026-10-11 06:31:11 -04:00
* The input is validated here, so it can come straight from any caller. Only the fields
* given are changed; a blank password leaves the password alone. Extension field values
* go under `extensions` as ValidatedExtensionValues.
*
* @param ActionInput $input any of the fields a user is created with
2026-10-05 18:10:18 -04:00
*
* @throws Throwable
*/
2026-10-11 06:31:11 -04:00
public function update(User $user, array $input): User;
2026-10-05 18:10:18 -04:00
}