Beispiel #1
0
 function tearDown()
 {
     // Restore selected authenticator
     // MemberAuthenticator might not actually be present
     if (!in_array('MemberAuthenticator', $this->priorAuthenticators)) {
         Authenticator::unregister('MemberAuthenticator');
     }
     Authenticator::set_default_authenticator($this->priorDefaultAuthenticator);
     parent::tearDown();
 }
 function tearDown()
 {
     // Restore selected authenticator
     // MemberAuthenticator might not actually be present
     if (!in_array('MemberAuthenticator', $this->priorAuthenticators)) {
         Authenticator::unregister('MemberAuthenticator');
     }
     Authenticator::set_default_authenticator($this->priorDefaultAuthenticator);
     // Restore unique identifier field
     Member::set_unique_identifier_field($this->priorUniqueIdentifierField);
     parent::tearDown();
 }
Beispiel #3
0
 public function tearDown()
 {
     // Restore selected authenticator
     // MemberAuthenticator might not actually be present
     if (!in_array('MemberAuthenticator', $this->priorAuthenticators)) {
         Authenticator::unregister('MemberAuthenticator');
     }
     foreach ($this->priorAuthenticators as $authenticator) {
         Authenticator::register($authenticator);
     }
     Authenticator::set_default_authenticator($this->priorDefaultAuthenticator);
     // Restore unique identifier field
     Member::config()->unique_identifier_field = $this->priorUniqueIdentifierField;
     Security::config()->remember_username = $this->priorRememberUsername;
     parent::tearDown();
 }
 function tearDown()
 {
     /* Remove the test files that we've created */
     $fileIDs = $this->allFixtureIDs('File');
     foreach ($fileIDs as $fileID) {
         $file = DataObject::get_by_id('File', $fileID);
         if (file_exists(BASE_PATH . "/{$file->Filename}")) {
             unlink(BASE_PATH . "/{$file->Filename}");
         }
     }
     /* Remove the test folders that we've crated */
     $fileIDs = array_reverse($this->allFixtureIDs('Folder'));
     foreach ($fileIDs as $fileID) {
         $file = DataObject::get_by_id('Folder', $fileID);
         if (file_exists(BASE_PATH . "/{$file->Filename}")) {
             rmdir(BASE_PATH . "/{$file->Filename}");
         }
     }
     if (!in_array('MemberAuthenticator', $this->priorAuthenticators)) {
         Authenticator::unregister('MemberAuthenticator');
     }
     Authenticator::set_default_authenticator($this->priorDefaultAuthenticator);
     parent::tearDown();
 }
Beispiel #5
0
 * Authenticator::register_authenticator('OpenIDAuthenticator');
 * </code>
 *
 * @package sapphire
 * @subpackage core
 */
/**
 * Add pear parser to include path
 */
$path = Director::baseFolder() . '/sapphire/parsers/';
set_include_path(get_include_path() . PATH_SEPARATOR . $path);
/**
 * Register the {@link OpenIDAuthenticator OpenID authenticator}
 */
Authenticator::register_authenticator('MemberAuthenticator');
Authenticator::set_default_authenticator('MemberAuthenticator');
/**
 * Define a default language different than english
 */
//i18n::set_locale('ca_AD');
/**
 * The root directory of TinyMCE
 */
define('MCE_ROOT', 'jsparty/tiny_mce2/');
/**
 * Should passwords be encrypted (TRUE) or stored in clear text (FALSE)?
 */
Security::encrypt_passwords(true);
/**
 * Which algorithm should be used to encrypt? Should a salt be used to
 * increase the security?