key = ''; } public function new_key($dcUserId) { $this->key = $this->rand_str(); $this -> put_dc_setting_user_key($dcUserId); return $this->key; } public function set_key($key) { $this->key = $key; } public function get_dc_admin_form($dcUserId) { global $core; //tester si une clef d'API a été générée if($this->dc_is_key_setting_set($dcUserId)){ $infoFormApiKey = __('Your api key has already been created.'); $buttonFormApiKey = __('Erase existing API key and generate a new one for').' '.$dcUserId; }else{ $infoFormApiKey = __('No API key found.'); $buttonFormApiKey = __('Generate a API key for').' '.$dcUserId; } if($this->key == ''){ $infoKey = $infoFormApiKey; }else{ $infoKey = '
'.__('The api key is').':
'.
__('Copy and paste it, You will cannot see it again.').'