Note that there are some explanatory texts on larger screens.

plurals
  1. POAuthorization adapter was not found in cakePHP
    primarykey
    data
    text
    <p>I'm trying to move my code from local to server when i try to login into the application</p> <p><img src="https://i.stack.imgur.com/d3dZZ.jpg" alt="enter image description here"></p> <pre><code>Here is my AppController class AppController extends Controller{ /* Determines what logged-in users access to */ var $components = array('Auth','Session'); public function isAuthorized($user){ return true; } public function beforeFilter(){ $userdetails = array(); $this-&gt;Auth-&gt;autoRedirect = false; $this-&gt;Auth-&gt;loginAction = array('controller' =&gt; 'users', 'action' =&gt; 'login'); $this-&gt;Auth-&gt;loginRedirect = array('controller' =&gt; 'matches', 'action' =&gt; 'index'); $this-&gt;Auth-&gt;authorize = 'controller'; $this-&gt;Auth-&gt;authError= 'You need permissions to access this page'; $this-&gt;Auth-&gt;allow('users'); $this-&gt;set('Auth',$this-&gt;Auth); $userdetails = $this-&gt;Auth-&gt;user(); $this-&gt;set('myUser', $userdetails['username']); $this-&gt;set('myRole', $userdetails['user_role_id']); $this-&gt;set('pStatus', $userdetails['password_status']); } } Here is my Login Action in UsersController public function login(){ $this-&gt;Auth-&gt;autoRedirect = false; $id = $this-&gt;Auth-&gt;user('id'); if(empty($id)){ if($this-&gt;request-&gt;is('post')){ if($this-&gt;Auth-&gt;login()){ $this-&gt;redirect($this-&gt;Auth-&gt;redirect()); }else{ $this-&gt;Session-&gt;setFlash('Invalid Username or password'); } } }else{ $this-&gt;redirect(array('action'=&gt;'index')); } } </code></pre> <p>Thanks for the help</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload