FIle - /trunk/views/php/forgot_password2.php
/trunk/views/php/forgot_password2.php
|
|
627 bytes
|
|
January 20, 2025 at 08:22
|
|
<?php
declare(strict_types = 1);
namespace Views;
use Apex\Svc\{View, App};
use Apex\Armor\User\Verify\ResetPassword;
/**
* Render the template.
*/
class forgot_password2
{
/**
* Render
*/
public function render(View $view, App $app, ResetPassword $reset):void
{
// `1`Init password reset
$action = $_POST['submit'] ?? '';
if ($action == 'reset') {
$reset->finish($app->post('new_password'));
$view->setTemplateFile('login.html', true);
$view->addCallout('Successfully reset your password. You may login again.');
}
}
}