Browse files

Merge pull request #149 from akrabat/hotfix-registration-link

Don't display the signup link if registration is disabled
  • Loading branch information...
2 parents 2523234 + 6dc58b5 commit 334c5aa6e801a9af61c683d1aca6391c0791c32d @EvanDotPro EvanDotPro committed Sep 24, 2012
Showing with 3 additions and 0 deletions.
  1. +1 −0 src/ZfcUser/Controller/UserController.php
  2. +2 −0 view/zfc-user/user/login.phtml
View
1 src/ZfcUser/Controller/UserController.php
@@ -77,6 +77,7 @@ public function loginAction()
return array(
'loginForm' => $form,
'redirect' => $redirect,
+ 'enableRegistration' => $this->getOptions()->getEnableRegistration(),
);
}
View
2 view/zfc-user/user/login.phtml
@@ -27,4 +27,6 @@ $form->setAttribute('method', 'post');
<?php echo $this->form()->closeTag() ?>
+<?php if ($this->enableRegistration) : ?>
Not registered? <a href="<?php echo $this->url('zfcuser/register') . ($this->redirect ? '?redirect='.$this->redirect : '') ?>">Sign up!</a>
+<?php endif; ?>

0 comments on commit 334c5aa

Please sign in to comment.