We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

problems login form

I am trying to build the INVO myself from the example In the SessionController I get errors.

class SessionController extends \Phalcon\Mvc\Controller {

public function initialize()
{
  $this->view->setTemplateAfter('main');
  Tag::setTitle('Login');
//  parent::initialize();
}

If I add the line Fatal error: Call to undefined method Phalcon\Mvc\Controller::initialize() in /usr/local/www/apache22/data/vlaming/app/controllers/SessionController.php on line 12

If I disable this line I will get: Sanitize filter password is not supported [code] public function startAction() { if($this->request->isPost()) { // Reeivinf the variables send by Post $email = $this->request->getPost('email', 'email'); $password = $this->request->getPost('password', 'password');

      //$password = sha1($password); // should be replaced by bcrypt

      //Find for the user in the database

      $this->flash->error('Wrong email/password');
  }

[/code]



4.1k

Ah I see 1 difference The class SessionController extends \Phalcon\Mvc\Controller class SessionController extends ControllerBase



4.1k

I still get the Sanitize filter password is not supported

Installed mcrypt did not help. phpinfo: https://owncloud.rayit.com/rayit/info.php



98.9k

There is no such filter 'password':

$password = $this->request->getPost('password', 'password');

You can leave it as just:

$password = $this->request->getPost('password');


4.1k

Many thanks! This works.