Commit 26d3ca3d authored by Jordan Breton's avatar Jordan Breton

updated

parent 07b0d6d1
......@@ -62,6 +62,4 @@ class Autoloader{
$file = "$this->_baseDir/".implode('/',$expl).".php";
if(file_exists($file)) require_once($file);
}
}
\ No newline at end of file
}
\ No newline at end of file
......@@ -31,12 +31,9 @@ final class Session implements ISession {
ini_set('session.use_strict_mode',true);
session_set_save_handler($handler,true);
}
if(is_null($timeout)){
$timeout = ini_get("session.gc_maxlifetime");
ini_set("session.gc_maxlifetime",$timeout);
}
ini_set("session.cookie_lifetime",$timeout);
$this->_timeout = ($timeout ?? 1800) * 1000 * 1000;
/*ini_set("session.gc_maxlifetime",$timeout);
ini_set("session.cookie_lifetime",$timeout);*/
$this->_firstStart = true;
$this->_logKey = $logKey;
}
......
......@@ -4,7 +4,7 @@ namespace wfw\engine\package\users\data\model\specs;
use wfw\engine\core\data\specification\LeafSpecification;
use wfw\engine\package\users\data\model\objects\User;
use wfw\engine\package\users\domain\types\Client;
use wfw\engine\package\users\domain\types\Customer;
/**
* Verfie si un utilisateur est un client
......@@ -20,6 +20,6 @@ final class IsClient extends LeafSpecification{
*/
public function isSatisfiedBy($candidate): bool {
/** @var User $candidate */
return $candidate->getType() instanceof Client;
return $candidate->getType() instanceof Customer;
}
}
\ No newline at end of file
......@@ -4,4 +4,4 @@ namespace wfw\engine\package\users\domain\types;
/**
* Représente un client ayant accés à une partie de l'application
*/
class Client extends UserType {}
\ No newline at end of file
class Customer extends UserType {}
\ No newline at end of file
......@@ -27,7 +27,7 @@ use wfw\engine\package\users\domain\Password;
use wfw\engine\package\users\domain\settings\InMemoryUserSettings;
use wfw\engine\package\users\domain\states\UserWaitingForRegisteringConfirmation;
use wfw\engine\package\users\domain\types\Basic;
use wfw\engine\package\users\domain\types\Client;
use wfw\engine\package\users\domain\types\Customer;
use wfw\engine\package\users\lib\confirmationCode\IUserConfirmationCodeGenerator;
use wfw\engine\package\users\lib\HTML\RegisterUserForm;
use wfw\engine\package\users\security\data\SelfRegisterRule;
......@@ -121,7 +121,7 @@ final class RegisterHandler implements IActionHandler, IDomainEventListener{
$type = $this->_conf->getString("server/modules/users/register_type");
switch($type){
case "client" :
$type = new Client(); break;
$type = new Customer(); break;
case "basic" :
$type = new Basic(); break;
default :
......
......@@ -13,7 +13,7 @@ use wfw\engine\package\users\command\ChangeType;
use wfw\engine\package\users\domain\events\UserTypeChangedEvent;
use wfw\engine\package\users\domain\types\Admin;
use wfw\engine\package\users\domain\types\Basic;
use wfw\engine\package\users\domain\types\Client;
use wfw\engine\package\users\domain\types\Customer;
use wfw\engine\package\users\handlers\action\DefaultUserActionHandler;
use wfw\engine\package\users\security\data\ChangeUserTypeRule;
......@@ -72,7 +72,7 @@ final class ChangeTypeHandler extends DefaultUserActionHandler implements IDomai
case "admin" :
$type = new Admin(); break;
case "client" :
$type = new Client(); break;
$type = new Customer(); break;
default :
$type = new Basic(); break;
}
......
......@@ -21,7 +21,7 @@ use wfw\engine\package\users\domain\settings\InMemoryUserSettings;
use wfw\engine\package\users\domain\states\DisabledUser;
use wfw\engine\package\users\domain\types\Admin;
use wfw\engine\package\users\domain\types\Basic;
use wfw\engine\package\users\domain\types\Client;
use wfw\engine\package\users\domain\types\Customer;
use wfw\engine\package\users\handlers\action\DefaultUserActionHandler;
use wfw\engine\package\users\security\data\RegisterUserRule;
......@@ -71,7 +71,7 @@ final class RegisterHandler extends DefaultUserActionHandler implements IDomainE
case "admin" :
$type = new Admin(); break;
case "client" :
$type = new Client(); break;
$type = new Customer(); break;
default :
$type = new Basic(); break;
}
......
......@@ -18,7 +18,7 @@ wfw.define("network/wfwAPI",(function($csrfToken){
return undefined;
}
if($code && typeof $params[$code] === 'function') $params[$code]($res);
else if(typeof $code === "string" && $code.charAt(0) !== '0') $error($res,$code);
else if($code && $code.toString().charAt(0) !== '0') $error($res,$code);
else if($success) $success($res,$code);
};
wfw.network.ajax($url,$params);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment