mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/tickme.git
synced 2026-08-19 20:43:58 +00:00
35 lines
614 B
PHP
35 lines
614 B
PHP
<?php
|
|
|
|
namespace App\Classes\Modules\Accounts\Services;
|
|
|
|
|
|
use App\Classes\Exceptions\MalformedRequestException;
|
|
use App\Models\PasswordReset;
|
|
use Illuminate\Database\QueryException;
|
|
|
|
class CompletesPasswordReset
|
|
{
|
|
|
|
|
|
/**
|
|
* @param PasswordReset $attempt
|
|
* @throws MalformedRequestException
|
|
*/
|
|
public function execute(PasswordReset $attempt){
|
|
|
|
try {
|
|
|
|
$attempt->is_complete = true;
|
|
$attempt->save();
|
|
|
|
return;
|
|
|
|
} catch (QueryException $exception){
|
|
|
|
throw new MalformedRequestException($exception->getMessage());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} |