streams/Code/Module/Regver.php

36 lines
572 B
PHP
Raw Normal View History

2016-04-19 03:38:38 +00:00
<?php
2022-02-16 04:08:28 +00:00
namespace Code\Module;
2016-04-19 03:38:38 +00:00
2020-01-14 20:14:34 +00:00
use App;
2022-02-16 04:08:28 +00:00
use Code\Web\Controller;
use Code\Lib\Account;
2022-01-25 01:26:12 +00:00
2021-12-02 23:02:31 +00:00
class Regver extends Controller
{
public function get()
{
$_SESSION['return_url'] = App::$cmd;
if (argc() != 3) {
killme();
}
$cmd = argv(1);
$hash = argv(2);
if ($cmd === 'deny') {
2022-01-25 01:26:12 +00:00
if (!Account::deny($hash)) {
2021-12-02 23:02:31 +00:00
killme();
}
}
if ($cmd === 'allow') {
2022-01-25 01:26:12 +00:00
if (!Account::approve($hash)) {
2021-12-02 23:02:31 +00:00
killme();
}
}
}
2016-04-19 03:38:38 +00:00
}