From: Roland Häder Date: Sun, 8 Jun 2008 17:58:51 +0000 (+0000) Subject: UserDatabaseWrapper is now changeable by config X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=9602c6fcc37aab0e4c00a319d33a03f19bb0902d;p=shipsimu.git UserDatabaseWrapper is now changeable by config --- diff --git a/inc/classes/main/user/class_User.php b/inc/classes/main/user/class_User.php index d5a9f98..68533c2 100644 --- a/inc/classes/main/user/class_User.php +++ b/inc/classes/main/user/class_User.php @@ -150,7 +150,7 @@ class User extends BaseFrameworkSystem implements ManageableUser, Registerable { $exists = true; // Get a UserDatabaseWrapper instance - $wrapperInstance = UserDatabaseWrapper::createUserDatabaseWrapper(); + $wrapperInstance = ObjectFactory::createObjectByConfiguredName('user_db_wrapper'); // Create a search criteria $criteriaInstance = ObjectFactory::createObjectByConfiguredName('search_criteria'); @@ -182,7 +182,7 @@ class User extends BaseFrameworkSystem implements ManageableUser, Registerable { $exists = true; // Get a UserDatabaseWrapper instance - $wrapperInstance = UserDatabaseWrapper::createUserDatabaseWrapper(); + $wrapperInstance = ObjectFactory::createObjectByConfiguredName('user_db_wrapper'); // Create a search criteria $criteriaInstance = ObjectFactory::createObjectByConfiguredName('search_criteria'); diff --git a/inc/config.php b/inc/config.php index 4abf5ab..62ccd3f 100644 --- a/inc/config.php +++ b/inc/config.php @@ -183,6 +183,9 @@ $cfg->setConfigEntry('crypto_heler', "CryptoHelper"); // CFG: RNG-CLASS $cfg->setConfigEntry('rng_class', "RandomNumberGenerator"); +// CFG: USER-DB-WRAPPER +$cfg->setConfigEntry('user_db_wrapper', "UserDatabaseWrapper"); + // CFG: MATH-PRIME $cfg->setConfigEntry('math_prime', 591623);