php - CakePhp 3 strange behavior AuthComponent -


environment: php 5.4.45 cakephp 3.1.11 debian 7

problem login not alway's working. after submit returns same login-page without error. after closing , restarting browser, login works expected. problem seems exist mostley google chrome. clients (on mac , google chrome) -even after closing , restarting- never able login. on same machine work safari , firefox.

on testserver (debian 8, php 5.6, cake 3.3) never experienced problem. again, since test-server, not used on lot of machines.

usercontroler login

public function login() {      $session = $this->request->session();     $session->destroy();     $session->renew();     cache::clear(false);     $this->viewbuilder()->layout('id_start');     if ($this->request->is('post')) {           $user = $this->auth->identify();          if ($user) {             $newtime = date("ymd|h:i:s");             $this->auth->setuser($user);             $this->loadmodel('teams');             $team = $this->teams->get($this->auth->user('id'));             $team['tijd'] = $newtime;             $this->teams->save($team);              $enter = hash('md2', $newtime);             $session_id = session_id();             $session->write('naam', $team['naam']);             $session->write('initialen', $team['initialen']);             $session->write('vol_naam', $team['vol_naam']);             $session->write('team_id', $team['id']);             $session->write('pass', md5($team['pass']));             $session->write('code', $team['code']);             $session->write('enter', $enter);             $session->write('session', $session_id);              return $this->redirect(['controller' => 'admins', 'action' => 'start']);          }         $this->flash->error(__('invalid username or password, try again'));     } }  enter code here 

as can see, try kill possible existing sessions , cache before start.

so questions are: behavior consequence of environement? , should update in order fix it? chrome make login fale? or making other mistake i'm not aware of.


Comments

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -