FIle - /trunk/views/php/forgot_password2.php

/trunk/views/php/forgot_password2.php
627 bytes
January 20, 2025 at 08:22
4




<?php
declare(strict_types 1);

namespace 
Views;

use 
Apex\Svc\{ViewApp};
use 
Apex\Armor\User\Verify\ResetPassword;

/**
 * Render the template.
 */
class forgot_password2
{

    
/**
     * Render
     */
    
public function render(View $viewApp $appResetPassword $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.');
        }

    }

}