Open roshanbudhathoki opened 8 years ago
Updated RedirectCallBack to fix not redirecting to a url problem. It was having problem here on two of these functions
private function routeExists($route) { try { $this->router->assemble(array(), array('name' => $route)); } catch (Exception\RuntimeException $e) { return false; } return true; } protected function getRedirect($currentRoute, $redirect = false) { $useRedirect = $this->options->getUseRedirectParameterIfPresent(); $routeExists = ($redirect && $this->routeExists($redirect)); if (!$useRedirect || !$routeExists) { $redirect = false; } switch ($currentRoute) { case 'zfcuser/register': case 'zfcuser/login': case 'zfcuser/authenticate': $route = ($redirect) ?: $this->options->getLoginRedirectRoute(); return $this->router->assemble(array(), array('name' => $route)); break; case 'zfcuser/logout': $route = ($redirect) ?: $this->options->getLogoutRedirectRoute(); return $this->router->assemble(array(), array('name' => $route)); break; default: return $this->router->assemble(array(), array('name' => 'zfcuser')); } }
Maybe you shuld also extend the test to show when it was failing exactly and that the fix works?
Updated RedirectCallBack to fix not redirecting to a url problem. It was having problem here on two of these functions