X-Git-Url: https://git.mxchange.org/?p=shipsimu.git;a=blobdiff_plain;f=inc%2Fclasses%2Fmain%2Ffilter%2Fupdate%2Fclass_UserUpdateFilter.php;h=c55989cef3034eb6dd7b5ee8f60ce58396b1d648;hp=b8f598f2d13c50e6b613dde077c0eb690e72b160;hb=3fa969fe802f144628b970758cc974e50f04f9dc;hpb=721ba61ffed98cdbabc8860d27dd21b104118221 diff --git a/inc/classes/main/filter/update/class_UserUpdateFilter.php b/inc/classes/main/filter/update/class_UserUpdateFilter.php index b8f598f..c55989c 100644 --- a/inc/classes/main/filter/update/class_UserUpdateFilter.php +++ b/inc/classes/main/filter/update/class_UserUpdateFilter.php @@ -5,7 +5,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software + * @copyright Copyright (c) 2007, 2008 Roland Haeder, this is free software * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * @@ -22,7 +22,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -class UserUpdateFilter extends BaseFrameworkSystem implements Filterable { +class UserUpdateFilter extends BaseFilter implements Filterable { /** * Protected constructor * @@ -31,16 +31,6 @@ class UserUpdateFilter extends BaseFrameworkSystem implements Filterable { protected function __construct () { // Call parent constructor parent::__construct(__CLASS__); - - // Set part description - $this->setObjectDescription("User update filter"); - - // Create unique ID number - $this->generateUniqueId(); - - // Clean up a little - $this->removeNumberFormaters(); - $this->removeSystemArray(); } /** @@ -62,19 +52,21 @@ class UserUpdateFilter extends BaseFrameworkSystem implements Filterable { * @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 $userInstance = Registry::getRegistry()->getInstance('user'); // Now update last activity - $userInstance->updateLastActivity(); + $userInstance->updateLastActivity($requestInstance); // Update auth data as well - /* @TODO Add more user updates here */ + $authInstance = Registry::getRegistry()->getInstance('auth'); + $authInstance->updateAuthData(); // Write all updates to the database - $userInstance->flushUpdates(); + $userInstance->flushPendingUpdates(); } }