mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
refactor: Don't access $_SESSION directly for Auth (#8513)
* Don't access $_SESSION directly for Auth * fix style * add property annotations
This commit is contained in:
committed by
Neil Lathwood
parent
2ece84495d
commit
7250376104
@@ -15,8 +15,10 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
use LibreNMS\Authentication\Auth;
|
||||
|
||||
session_start();
|
||||
if (!isset($_SESSION['authenticated'])) {
|
||||
if (!Auth::check()) {
|
||||
die('Unauthorized.');
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user