protected function controlTokenUserForgot($user, $token)
    {
        if (!empty($user['status'])) {

            if (empty($user['data']['reset_password']['token'])) {
                $this->redirect('forgot');
            }

            if (!gplcart_string_equals($user['data']['reset_password']['token'], $token)) {
                $this->outputHttpStatus(403);
            }

            if (empty($user['data']['reset_password']['expires']) || $user['data']['reset_password']['expires'] < GC_TIME) {
                $this->redirect('forgot');
            }
        }
    }
protected function controlTokenUserForgot($user, $token)
    {
        if (!empty($user['status'])) {

            if (empty($user['data']['reset_password']['token'])) {
                $this->redirect('forgot');
            }

            if (!gplcart_string_equals($user['data']['reset_password']['token'], $token)) {
                $this->outputHttpStatus(403);
            }

            if (empty($user['data']['reset_password']['expires']) || $user['data']['reset_password']['expires'] < GC_TIME) {
                $this->redirect('forgot');
            }
        }
    }
protected function controlTokenUserForgot ( $ user , $ token ) { if ( ! empty ( $ user [ 'status' ] ) ) { if ( empty ( $ user [ 'data' ] [ 'reset_password' ] [ 'token' ] ) ) { $ this -> redirect ( 'forgot' ) ; } if ( ! gplcart_string_equals ( $ user [ 'data' ] [ 'reset_password' ] [ 'token' ] , $ token ) ) { $ this -> outputHttpStatus ( 403 ) ; } if ( empty ( $ user [ 'data' ] [ 'reset_password' ] [ 'expires' ] ) || $ user [ 'data' ] [ 'reset_password' ] [ 'expires' ] < GC_TIME ) { $ this -> redirect ( 'forgot' ) ; } } }
Validates the token and its expiration time set for the user
@param array $user
@param string $token
Validates the token and its expiration time set for the user