private $hashedPassword = "";
/**
- * Private constructor
+ * Protected constructor
*
* @return void
*/
// Get a new instance
$registrationInstance = new ShipSimuRegistration();
+ // Initialize the filter chains
+ $registrationInstance->initFilterChains();
+
// And return it
return $registrationInstance;
}
// Check if the password is found in the request
if ($this->getRequestInstance()->isRequestElementSet($requestKey)) {
// So encrypt the password and store it for later usage in
- // the request
- $this->hashedPassword = ObjectFactory::createObjectByConfiguredName('crypto_heler')->hashPassword($this->getRequestInstance()->getRequestElement($requestKey));
+ // the request:
+ // 1.: Get the plain password
+ $plainPassword = $this->getRequestInstance()->getRequestElement($requestKey);
+ // 2. Get a crypto helper and hash the password
+ $this->hashedPassword = ObjectFactory::createObjectByConfiguredName('crypto_heler')->hashPassword($plainPassword);
+ // 3. Store the hash back in the request
$this->getRequestInstance()->setRequestElement('pass_hash', $this->hashedPassword);
}
}
* @return void
*/
public function doPreRegistration () {
- $this->partialStub();
+ // First run all pre filters
+ $this->executePreFilters();
}
/**
* @return void
*/
public function doPostRegistration () {
- $this->partialStub();
+ // First run all post filters
+ $this->executePostFilters();
}
/**