Skip to content

Commit

Permalink
Merge pull request #26 from Rvey/master
Browse files Browse the repository at this point in the history
add login redirect function
  • Loading branch information
bobdenotter authored Sep 8, 2022
2 parents 702a954 + 219a8e3 commit 279284e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ For logging in:
| `login_form_password` | Renders the password field |
| `login_form_csrf` | Renders a hidden field that contains a CSRF token. |
| `login_form_submit` | Renders the submit button |
| `login_redirect_url` | redirect to "/" after submit |


Each field function above takes an optional `withlabel` argument and the `labels` argument
Expand Down
1 change: 1 addition & 0 deletions src/Twig/LoginFormExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ public function getFunctions(): array
new TwigFunction('login_form_password', [$this, 'getPasswordField'], $safe),
new TwigFunction('login_form_csrf', [$this, 'getCsrfField'], $safe),
new TwigFunction('login_form_submit', [$this, 'getSubmitButton'], $safe),
new TwigFunction('login_redirect_url', [$this, 'getRedirectField'], $safe),
];
}

Expand Down

0 comments on commit 279284e

Please sign in to comment.