diff -r 5b37998e522e -r 162c1de6545a web/lib/Zend/Session/Validator/HttpUserAgent.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/lib/Zend/Session/Validator/HttpUserAgent.php Fri Mar 11 15:05:35 2011 +0100 @@ -0,0 +1,66 @@ +setValidData( (isset($_SERVER['HTTP_USER_AGENT']) + ? $_SERVER['HTTP_USER_AGENT'] : null) ); + } + + /** + * Validate() - this method will determine if the current user agent matches the + * user agent we stored when we initialized this variable. + * + * @return bool + */ + public function validate() + { + $currentBrowser = (isset($_SERVER['HTTP_USER_AGENT']) + ? $_SERVER['HTTP_USER_AGENT'] : null); + + return $currentBrowser === $this->getValidData(); + } + +}