connected()) throw new Exception("Vous devez être connecté pour accéder à la page",401); $api_enabled = $myUser->preference('api_enabled'); $api_id = decrypt($myUser->preference('api_id')); $api_secret = decrypt($myUser->preference('api_secret')); if(empty($api_id)){ $myUser->preference('api_id',encrypt(bin2hex(random_bytes(15)))); $myUser->preference('api_secret',encrypt(bin2hex(random_bytes(15)))); $api_id = decrypt($myUser->preference('api_id')); $api_secret = decrypt($myUser->preference('api_secret')); $myUser->loadPreferences(); $_SESSION['currentUser'] = serialize($myUser); } ?>

Enregistrer

API & TOKEN


ID API :
SECRET API :