* @param $requestInstance An instance of a class with an Requestable interface
* @param $responseInstance An instance of a class with an Responseable interface
* @return void
+ * @todo Maybe we need to do something later here
*/
public function execute (Requestable $requestInstance, Responseable $responseInstance) {
- /* @todo Maybe we need to do something later here */
}
}
* @param $controllerInstance A controller instance
* @param $requestInstance An instance of a class with an Requestable interface
* @return void
+ * @todo Add more filters
*/
public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance) {
// Which login type do we have?
break;
}
- /* @todo Add more filters */
+ // Add password verifier filter
$controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('password_verifier_class'));
}
}
* @param $controllerInstance A controller instance
* @param $requestInstance An instance of a class with an Requestable interface
* @return void
+ * @todo Add some more pre/post filters to the controller
*/
public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance) {
// Add user auth filter (we don't need an update of the user here because it will be redirected)
$controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_auth_class'));
- /* @todo Add some more pre/post filters to the controller */
+ // User status filter
$controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_status_class'));
+
+ // Updated rules accepted
$controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('rules_accepted_class'));
+
+ // Account password validation
$controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('account_password_class'));
+
+ // Email changed
$controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('email_change_class'));
+
+ // Password changed
$controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('password_change_class'));
}
}
* @param $controllerInstance A controller instance
* @param $requestInstance An instance of a class with an Requestable interface
* @return void
+ * @todo Add some more pre/post filters to the controller
*/
public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance) {
- /* @todo Add some more pre/post filters to the controller */
$controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('email_validator_class'));
$controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('username_validator_class'));
$controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('username_is_guest_class'));
* @param $controllerInstance A controller instance
* @param $requestInstance An instance of a class with an Requestable interface
* @return void
+ * @todo Add more filters
*/
public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance) {
// Which login type do we have?
break;
}
- /* @todo Add more filters */
+ // Password verifier filter
$controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('password_verifier_class'));
}
}
* User class
* @throws UserPasswordMismatchException If the supplied password did not
* match with the stored password
+ * @todo We need to add something here which will make more than one
+ * @todo guest logins, users who are online but based on the same
+ * @todo user account.
*/
public function doLogin (Requestable $requestInstance, Responseable $responseInstance) {
// By default no method is selected
throw new UserPasswordMismatchException(array($this, $userInstance), User::EXCEPTION_USER_PASS_MISMATCH);
} // END - if
- /* @todo We need to add something here which will make more than one */
- /* @todo guest logins, users who are online but based on the same */
- /* @todo user account. */
+ // ToDo place
// Now do the real login. This can be cookie- or session-based login
// which depends on the admins setting then on the user's taste.
* Prepares some general data which shall be displayed on every page
*
* @return void
+ * @todo Add some stuff here: Some personal data, app/game related data
*/
protected function prepareCommand () {
- /* @todo Add some stuff here: Some personal data, app/game related data */
}
/**
*
* @param $resolverInstance An instance of a command resolver class
* @return $controllerInstance A prepared instance of this class
+ * @todo Add some filters to this controller
*/
public final static function createWebLoginController (CommandResolver $resolverInstance) {
// Create the instance
// Set the command resolver
$controllerInstance->setResolverInstance($resolverInstance);
- /* @todo Add some filters to this controller */
// Return the prepared instance
return $controllerInstance;
* Makes sure that the database connection is alive
*
* @return void
+ * @todo Do some checks on the database directory and files here
*/
public function connectToDatabase () {
- /* @todo Do some checks on the database directory and files here */
}
/**
* @param $requestInstance An instance of a class with an Requestable interface
* @param $responseInstance An instance of a class with an Responseable interface
* @return void
+ * @todo Unfinished stub, add functionality here
*/
public function execute (Requestable $requestInstance, Responseable $responseInstance) {
- /* @todo Unfinished stub, add functionality here */
}
}
* @param $requestInstance An instance of a class with an Requestable interface
* @param $responseInstance An instance of a class with an Responseable interface
* @return void
+ * @todo Add more user updates here
*/
public function execute (Requestable $requestInstance, Responseable $responseInstance) {
// Get user instance from registry
$authInstance = Registry::getRegistry()->getInstance('auth');
$authInstance->updateAuthData();
- /* @todo Add more user updates here */
-
// Write all updates to the database
$userInstance->flushUpdates();
}
* @param $formId Id of the form (attribute "id"; default: false)
* @return void
* @throws InvalidFormNameException If the form name is invalid (=false)
+ * @todo Add some unique PIN here to bypass problems with some browser and/or extensions
*/
public function addFormTag ($formName = false, $formId = false) {
// When the form is not yet opened at least form name must be valid
$this->addFormGroup("", "");
} // END - if
- /* @todo Add some unique PIN here to bypass problems with some browser and/or extensions */
// Simply close it
$this->formOpened = false;
}
* Checks wether the rules has been updated
*
* @return $rulesUpdated Wether rules has been updated
+ * @todo Implement check if rules have been changed
*/
public function ifRulesHaveChanged () {
- /* @todo Implement check if rules have been changed */
return false;
}
* @param $expires Timestamp of expiration (default: configured)
* @return void
* @throws ResponseHeadersAlreadySentException If headers are already sent
+ * @todo Encryption of cookie data not yet supported.
+ * @todo Why are these parameters conflicting?
+ * @todo If the return statement is removed and setcookie() commented out,
+ * @todo this will send only one cookie out, the first one.
*/
public function addCookie ($cookieName, $cookieValue, $encrypted = false, $expires = null) {
// Are headers already sent?
// Shall we encrypt the cookie?
if ($encrypted === true) {
- /* @todo Encryption of cookie data not yet supported */
} // END - if
// For slow browsers set the cookie array element first
$domain = $this->getConfigInstance()->readConfig('cookie_domain');
setcookie($cookieName, $cookieValue, $expires);
- /* @todo Why are these parameters conflicting? */
//, $path, $domain, (isset($_SERVER['HTTPS']))
return;
- /* @todo This will send only one cookie out, the first one. */
// Now construct the full header
$cookieString = $cookieName . "=" . $cookieValue . "; ";
$cookieString .= "expires=" . date("D, d-F-Y H:i:s", $expires) . " GMT";
- /* @todo Why are these parameters conflicting? */
// $cookieString .= "; path=".$path."; domain=".$domain;
// Set the cookie as a header
* Initializes the random number generator
*
* @return void
+ * @todo Add site key for stronger salt!
*/
protected function initRng () {
// Seed mt_rand()
$this->fixedSalt = sha1($serverIp . ":" . serialize($this->getDatabaseInstance()->getConnectionData()));
// One-way data we need for "extra-salting" the random number
- /* @todo Add site key for stronger salt! */
$this->extraSalt = sha1($this->fixedSalt . ":" . getenv('SERVER_SOFTWARE') . ":" . $this->getConfigInstance()->readConfig('date_key'));
// Get config entry for max salt length
* @param $min Min value to generate
* @param $max Max value to generate
* @return $num Pseudo-random number
+ * @todo I had a better random number generator here but now it is somewhere lost :(
*/
public function randomNumnber ($min, $max) {
- /* @todo I had a better random number generator here but now it is somewhere lost :( */
return mt_rand($min, $max);
}
*
* @param $varMatches An array full of variable/value pairs.
* @return void
+ * @todo Unfinished work or don't die here.
*/
private function assignAllVariables (array $varMatches) {
// Search for all variables
$this->assignVariable($var, $varMatches[3][$key]);
} elseif (!empty($varMatches[2][$key])) {
// Non-string found so we need some deeper analysis...
- /* @todo Unfinished work or don't die here. */
die("Deeper analysis not yet implemented!");
}
* Compile all variables by inserting their respective values
*
* @return void
+ * @todo Make this code some nicer...
*/
public final function compileVariables () {
// Initialize the $content array
);
// This loop does remove the backslashes (\) in PHP parameters
- /* @todo Make this some nicer... */
while (strpos($eval, "<?") !== false) {
// Get left part before "<?"
$evalLeft = substr($eval, 0, strpos($eval, "<?"));