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)
|
||||
{
|
||||
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 '';
|
||||
|
@ -187,7 +187,7 @@ class User
|
|||
global $db_pass;
|
||||
if (isset($uid)) {
|
||||
$token = self::generateToken($uid);
|
||||
setcookie('uid', $token['token'], time() + 86400 * 30);
|
||||
setcookie('uid', $token['token'], time() + 86400 * 30, "/");
|
||||
return $token;
|
||||
} else {
|
||||
return false;
|
||||
|
@ -197,7 +197,7 @@ class User
|
|||
public static function removeCookie()
|
||||
{
|
||||
if (isset($_COOKIE['uid'])) {
|
||||
setcookie('uid', '', time() - 86400);
|
||||
setcookie('uid', '', time() - 86400, "/");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -277,7 +277,8 @@ class User
|
|||
return $d;
|
||||
}
|
||||
|
||||
public static function setFormCustomField($uid = 0){
|
||||
public static function setFormCustomField($uid = 0)
|
||||
{
|
||||
global $UPLOAD_PATH;
|
||||
$fieldPath = $UPLOAD_PATH . DIRECTORY_SEPARATOR . "customer_field.json";
|
||||
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;
|
||||
$fieldPath = $UPLOAD_PATH . DIRECTORY_SEPARATOR . "customer_field.json";
|
||||
if (!file_exists($fieldPath)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue