title: Set A Role To User Programmatically without RBAC?
body: <p>I don't use RBAC to validate users. I wouldn't mind using it if it's possible, but I don't think it is. Reason being, I use a REST API to validate users. I have this in my authenticate() function:</p>
  
  <pre><code>$API = new API();
  $user = $API-&gt;getAccountDetailsByEmail($this-&gt;username);
  if($user-&gt;password !== md5($this-&gt;password) ) {
     // Validated
  }
  </code></pre>
  
  <p>I want the user to also be assigned a role at this step. Which is why I tried the following below the above:</p>
  
  <pre><code>$this-&gt;setState('roles', 'admin'); 
  </code></pre>
  
  <p>But this doesn't work at all. I still get:</p>
  
  <pre><code>Error 403: You are not authorized to perform this action.
  </code></pre>
  
  <p>When I go to the page I am trying to make admin accessible. How do I programmatically set a user as an admin?</p>
  
  <p>Am I missing something, or is there an easy way to assign a role to a user that was authenticated?</p>