���ѧۧݧ�ӧ�� �ާ֧ߧ֧էا֧� - ���֧էѧܧ�ڧ��ӧѧ�� - /home/rickpfrv/tie.cx/app/controllers/AccountDelete.php
���ѧ٧ѧ�
<?php namespace Altum\Controllers; use Altum\Alerts; use Altum\Middlewares\Authentication; use Altum\Middlewares\Csrf; use Altum\Models\User; class AccountDelete extends Controller { public function index() { Authentication::guard(); if(!empty($_POST)) { /* Check for any errors */ if(!Csrf::check()) { Alerts::add_error(language()->global->error_message->invalid_csrf_token); } if(!password_verify($_POST['current_password'], $this->user->password)) { Alerts::add_field_error('current_password', language()->account->error_message->invalid_current_password); } if(!Alerts::has_field_errors() && !Alerts::has_errors()) { /* Delete the user */ (new User())->delete($this->user->user_id); Authentication::logout(); } } /* Establish the account sidebar menu view */ $menu = new \Altum\Views\View('partials/account_header', (array) $this); $this->add_view_content('account_header', $menu->run()); /* Prepare the View */ $view = new \Altum\Views\View('account-delete/index', (array) $this); $this->add_view_content('content', $view->run([])); } }
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | ���֧ߧ֧�ѧ�ڧ� ����ѧߧڧ��: 0 |
proxy
|
phpinfo
|
���ѧ����ۧܧ�