I have a problem with my sfDoctrineGuardPlugin... this question is related to...
I create the entity Enterprise and Customer and associate well with their group and entity. Now i create a module called sfGuard whith signinSucces.php because i want to custom that and the code is:
public function executeSignin($request)
{
$this->form = new LoginForm();
if ( $request->isMethod('post')){
$this->processForm($request, $this->form);
}
}
protected function processForm(sfWebRequest $request, sfForm $form)
{
$form->bind($request->getParameter($form->getName()), $request->getFiles($form->getName()));
if ($form->isValid())
{
parent::executeSignin($request);
}
}
My loginForm code is...
class LoginForm extends sfGuardUserForm
{
public function configure()
{
$this->useFields(array('username', 'password'));
unset($this['id']);
$this->widgetSchema->setLabels(array(
'username' => 'Email',
'password' => 'Pass'
));
$this->setValidators(array(
'username' => new sfValidatorEmail(array('required' => true)),
'password' => new sfValidatorString(array('required' => true))
));
}
}
Well, if I try to do login it returns me error: "The username and/or password is invalid." and i'm sure that username an password are correct. My questions are:
1) There are any way to show password not encripted in sha1? It's so good to encrypt but at this way i never can see if the user password is OK. 2) How is possible that if i fill correct username and password it don't login correctly? 3) I'm doing it well?
thanks a lot.