public function setSMSAPICredential($provider, $credentials = array())
    {
        $this->checkCredentialManagementRights();

        $smsProviderInstance = SMSProvider::factory($provider);
        $smsProviderInstance->verifyCredential($credentials);

        $settings = $this->getCredentialManagerSettings();

        $settings[MobileMessaging::PROVIDER_OPTION] = $provider;
        $settings[MobileMessaging::API_KEY_OPTION] = $credentials;

        $this->setCredentialManagerSettings($settings);

        return true;
    }
public function setSMSAPICredential($provider, $credentials = array())
    {
        $this->checkCredentialManagementRights();

        $smsProviderInstance = SMSProvider::factory($provider);
        $smsProviderInstance->verifyCredential($credentials);

        $settings = $this->getCredentialManagerSettings();

        $settings[MobileMessaging::PROVIDER_OPTION] = $provider;
        $settings[MobileMessaging::API_KEY_OPTION] = $credentials;

        $this->setCredentialManagerSettings($settings);

        return true;
    }
public function setSMSAPICredential ( $ provider , $ credentials = array ( ) ) { $ this -> checkCredentialManagementRights ( ) ; $ smsProviderInstance = SMSProvider :: factory ( $ provider ) ; $ smsProviderInstance -> verifyCredential ( $ credentials ) ; $ settings = $ this -> getCredentialManagerSettings ( ) ; $ settings [ MobileMessaging :: PROVIDER_OPTION ] = $ provider ; $ settings [ MobileMessaging :: API_KEY_OPTION ] = $ credentials ; $ this -> setCredentialManagerSettings ( $ settings ) ; return true ; }
set the SMS API credential

@param string $provider SMS API provider
@param array $credentials array with data like API Key or username

@return bool true if SMS API credential were validated and saved, false otherwise
set the SMS API credential