Only admin can register new user
This commit is contained in:
parent
6040897552
commit
9296c7798e
@ -34,14 +34,11 @@ class Home
|
||||
|
||||
public function register()
|
||||
{
|
||||
if (Session::exists('userid')) {
|
||||
if (Session::get('privilage') == 1) {
|
||||
if (Session::exists('userid') && Session::get('privilage') == 1) {
|
||||
View::render('Access/registrasi.html', [
|
||||
'token' => Token::generate()
|
||||
]);
|
||||
}
|
||||
} else {
|
||||
Session::flash('info', Session::get('privilage'));
|
||||
Redirect::to('/');
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user