mirror of
https://github.com/monstra-cms/monstra.git
synced 2025-08-03 11:47:51 +02:00
Admin index.php fixes
This commit is contained in:
@@ -93,7 +93,7 @@
|
|||||||
|
|
||||||
|
|
||||||
// Send
|
// Send
|
||||||
@mail($user['email'], __('Your login details for :site_name', 'users', array('site_name' => $site_name)), $message);
|
@mail($user['email'], __('Your login details for :site_name', 'users', array(':site_name' => $site_name)), $message);
|
||||||
|
|
||||||
// Set notification
|
// Set notification
|
||||||
Notification::set('success', __('Your login details for :site_name has been sent', 'users', array(':site_name' => $site_name)));
|
Notification::set('success', __('Your login details for :site_name has been sent', 'users', array(':site_name' => $site_name)));
|
||||||
@@ -108,10 +108,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
// If admin user is login = true then set is_admin = true
|
// If admin user is login = true then set is_admin = true
|
||||||
if (Session::exists('admin')) {
|
if (Session::exists('admin') && Session::get('admin') == true) {
|
||||||
if (Session::get('admin') == true) {
|
|
||||||
$is_admin = true;
|
$is_admin = true;
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
$is_admin = false;
|
$is_admin = false;
|
||||||
}
|
}
|
||||||
@@ -123,13 +121,10 @@
|
|||||||
|
|
||||||
// If is admin then load admin area
|
// If is admin then load admin area
|
||||||
if ($is_admin) {
|
if ($is_admin) {
|
||||||
|
|
||||||
// If id is empty then redirect to default plugin PAGES
|
// If id is empty then redirect to default plugin PAGES
|
||||||
if (Request::get('id')) {
|
if (Request::get('id')) {
|
||||||
if (Request::get('sub_id')) {
|
|
||||||
$area = Request::get('sub_id');
|
|
||||||
} else {
|
|
||||||
$area = Request::get('id');
|
$area = Request::get('id');
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
Request::redirect('index.php?id=pages');
|
Request::redirect('index.php?id=pages');
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user