function Report($f3) { $server = $this->loadServer(); if (!$f3->exists('SESSION.uid', $uid)) { $f3->reroute('/home/member/server'); } $account = new \Webmin($server); $account->load($uid); $account->pass = $f3->get('SESSION.pass'); $f3->set('server', $server); $f3->set('user', $account); $f3->set('subcontent', 'member/account.html'); $f3->clear('SESSION.uid'); $f3->clear('SESSION.pass'); }
function Apply($f3) { $server = $this->loadServer(); $account = $this->loadUser($server); if ($account->dry()) { if (!$account->check($f3->get('POST.user'))) { $this->flash('User Sudah Terdaftar'); $f3->reroute($f3->get('URI')); } $account->real = $this->me->username; } $account->copyFrom('POST'); if ($f3->exists('POST.pass', $pass)) { if (!\Check::Confirm('POST.pass')) { $this->flash('Konfirmasi Password Tidak Cocok'); $f3->reroute($f3->get('URI')); } $account->pass = $account->crypt($pass); } if ($f3->exists('POST.exp', $exp)) { $account->expire = \Webmin::exp_encode($exp); } $account->save(); $this->flash('Berhasil Disimpan', 'success'); $f3->reroute('/home/admin/server/' . $server->id . '/account/' . $account->uid); }