You are here

public function deploy_ui_endpoint::edit_form_authenticator_submit in Deploy - Content Staging 7.3

Same name and namespace in other branches
  1. 7.2 modules/deploy_ui/plugins/export_ui/deploy_ui_endpoint.class.php \deploy_ui_endpoint::edit_form_authenticator_submit()

Authenticator form submit handler.

File

modules/deploy_ui/plugins/export_ui/deploy_ui_endpoint.class.php, line 147
CTools export UI implementation for deploy endpoints.

Class

deploy_ui_endpoint
Deploy endpoint UI class that extends CTools Export UI.

Code

public function edit_form_authenticator_submit(&$form, &$form_state) {
  $item = $form_state['item'];
  if (!empty($form_state['values']['authenticator_config'])) {
    $item->authenticator_config = $form_state['values']['authenticator_config'];
    $encrypt['username'] = _deploy_encrypt($form_state['values']['authenticator_config']['username']);
    $encrypt['password'] = _deploy_encrypt($form_state['values']['authenticator_config']['password']);
    $item->authenticator_config = $encrypt;
  }
  else {
    $item->authenticator_config = array();
  }
  if (module_exists('encrypt')) {

    // Removing default php encryption state.
    if (_deploy_get_php_encryption_state()) {
      variable_del('deploy_php_encryption_state');
    }
  }
}