*
* @author Roland Haeder <webmaster@ship-simu.org>
* @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
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-class UserUpdateFilter extends BaseFrameworkSystem implements Filterable {
+class UserUpdateFilter extends BaseFilter implements Filterable {
/**
* Protected constructor
*
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();
}
/**
* @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();
}
}