Store PHP sessions in the database

This commit is contained in:
Frédéric Guillot
2017-12-06 16:19:11 -08:00
committed by Frédéric Guillot
parent 421531bd4f
commit ccd177ada6
58 changed files with 405 additions and 382 deletions

View File

@@ -69,17 +69,17 @@ class PasswordResetValidator extends BaseValidator
*
* @access protected
* @param array $values Form values
* @return boolean
* @return array
*/
protected function validateCaptcha(array $values)
{
$errors = array();
if (! isset($this->sessionStorage->captcha)) {
if (! session_exists('captcha')) {
$result = false;
} else {
$builder = new CaptchaBuilder;
$builder->setPhrase($this->sessionStorage->captcha);
$builder->setPhrase(session_get('captcha'));
$result = $builder->testPhrase(isset($values['captcha']) ? $values['captcha'] : '');
if (! $result) {