Skip to content
Browse files

Don't display the signup link if registration is disabled

  • Loading branch information...
1 parent 2523234 commit 6dc58b5155b410f1b78da7059c97ff7f787c3b73 @akrabat akrabat 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 6dc58b5

Please sign in to comment.
Something went wrong with that request. Please try again.