You are here

public function MiniorangeOAuthClientCustomerSetup::miniorange_oauth_client_back in OAuth2 Login 8

File

src/Form/MiniorangeOAuthClientCustomerSetup.php, line 249
Contains \Drupal\miniorange_oauth_client\Form\MiniorangeOAuthClientCustomerSetup.

Class

MiniorangeOAuthClientCustomerSetup

Namespace

Drupal\oauth2_login\Form

Code

public function miniorange_oauth_client_back(&$form, $form_state) {
  $current_status = 'CUSTOMER_SETUP';
  \Drupal::configFactory()
    ->getEditable('oauth2_login.settings')
    ->set('miniorange_oauth_client_status', $current_status)
    ->save();
  \Drupal::configFactory()
    ->getEditable('oauth2_login.settings')
    ->clear('miniorange_miniorange_oauth_client_customer_admin_email')
    ->save();
  \Drupal::configFactory()
    ->getEditable('oauth2_login.settings')
    ->clear('miniorange_oauth_client_customer_admin_phone')
    ->save();
  \Drupal::configFactory()
    ->getEditable('oauth2_login.settings')
    ->clear('miniorange_oauth_client_tx_id')
    ->save();
  \Drupal::messenger()
    ->addMessage(t('Register/Login with your miniOrange Account'), 'status');
}