mirror of
https://github.com/hotspotbilling/phpnuxbill.git
synced 2025-08-28 13:58:24 +02:00
fix cookies
This commit is contained in:
parent
91271b9f00
commit
b6fadae2e5
1 changed files with 19 additions and 17 deletions
|
@ -29,7 +29,7 @@ class User
|
||||||
public static function getTawkToHash($email)
|
public static function getTawkToHash($email)
|
||||||
{
|
{
|
||||||
global $config;
|
global $config;
|
||||||
if (!empty($config['tawkto_api_key']) && !Empty($email)) {
|
if (!empty($config['tawkto_api_key']) && !empty($email)) {
|
||||||
return hash_hmac('sha256', $email, $config['tawkto_api_key']);
|
return hash_hmac('sha256', $email, $config['tawkto_api_key']);
|
||||||
}
|
}
|
||||||
return '';
|
return '';
|
||||||
|
@ -187,7 +187,7 @@ class User
|
||||||
global $db_pass;
|
global $db_pass;
|
||||||
if (isset($uid)) {
|
if (isset($uid)) {
|
||||||
$token = self::generateToken($uid);
|
$token = self::generateToken($uid);
|
||||||
setcookie('uid', $token['token'], time() + 86400 * 30);
|
setcookie('uid', $token['token'], time() + 86400 * 30, "/");
|
||||||
return $token;
|
return $token;
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
|
@ -197,7 +197,7 @@ class User
|
||||||
public static function removeCookie()
|
public static function removeCookie()
|
||||||
{
|
{
|
||||||
if (isset($_COOKIE['uid'])) {
|
if (isset($_COOKIE['uid'])) {
|
||||||
setcookie('uid', '', time() - 86400);
|
setcookie('uid', '', time() - 86400, "/");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -277,7 +277,8 @@ class User
|
||||||
return $d;
|
return $d;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function setFormCustomField($uid = 0){
|
public static function setFormCustomField($uid = 0)
|
||||||
|
{
|
||||||
global $UPLOAD_PATH;
|
global $UPLOAD_PATH;
|
||||||
$fieldPath = $UPLOAD_PATH . DIRECTORY_SEPARATOR . "customer_field.json";
|
$fieldPath = $UPLOAD_PATH . DIRECTORY_SEPARATOR . "customer_field.json";
|
||||||
if (!file_exists($fieldPath)) {
|
if (!file_exists($fieldPath)) {
|
||||||
|
@ -291,7 +292,8 @@ class User
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getFormCustomField($ui, $register = false, $uid = 0){
|
public static function getFormCustomField($ui, $register = false, $uid = 0)
|
||||||
|
{
|
||||||
global $UPLOAD_PATH;
|
global $UPLOAD_PATH;
|
||||||
$fieldPath = $UPLOAD_PATH . DIRECTORY_SEPARATOR . "customer_field.json";
|
$fieldPath = $UPLOAD_PATH . DIRECTORY_SEPARATOR . "customer_field.json";
|
||||||
if (!file_exists($fieldPath)) {
|
if (!file_exists($fieldPath)) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue