views:

506

answers:

1

I have a problem with my sfDoctrineGuardPlugin... this question is related to...

http://stackoverflow.com/questions/2183552/two-tables-relation-with-sfdoctrineguard-user-table-symfony

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.

A: 

1) Sign-in scenario is in sfGuardAuth module of plugin, just open it and you can see all things there
2) Also, look at the code
3) Depends on what you expect

So, what kind of customization you want to do?

Darmen
Darmen i fixed it today... the solution is only overwrite template module. thanks.
nebur85