mirror of
https://github.com/danpros/htmly.git
synced 2026-04-22 13:36:22 +05:30
no cookie for just reading
This commit is contained in:
parent
d3b6a67a57
commit
7e709addb5
3 changed files with 6 additions and 2 deletions
|
|
@ -1,9 +1,10 @@
|
|||
<?php
|
||||
|
||||
session_start();
|
||||
if (isset($_COOKIE['PHPSESSID']))
|
||||
session_start();
|
||||
|
||||
function login()
|
||||
{
|
||||
if (session_status() == PHP_SESSION_NONE) return false;
|
||||
if (isset($_SESSION[config("site.url")]['user']) && !empty($_SESSION[config("site.url")]['user'])) {
|
||||
return true;
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue