Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create a custom login for sfGuard user in Symfony?

I am using Symfony 1.4 and ORM as Propel in my project. I have configured the Settings.yml to secure my page. But can i make a custom login/logout by my action extending all the SfGuard plugins functionality.i found one article in SymfonyLab, but was not clear enough.

like image 845
Harish Kurup Avatar asked Dec 22 '22 21:12

Harish Kurup


1 Answers

Easiest way to override the view of sfGuard signin:

1) Create a directory called 'sfGuardAuth' in your frontend module:

mkdir apps/frontend/modules/sfGuardAuth
mkdir apps/frontend/modules/sfGuardAuth/templates

2) Copy the default templates from the sfGuardPlugin folder to the new module

cp plugins/sfGuardPlugin/modules/sfGuardAuth/templates/* apps/frontend/modules/sfGuardAuth/templates

3) Edit the new files to your hearts content

4) Clear cache

./symfony cc
like image 188
cvaldemar Avatar answered Dec 24 '22 09:12

cvaldemar