public function allow($user, $pass = null)
{
// creates fictional model to allow specified user and password
// TODO: test this
if ($this->model) {
$this->model->table[] = array($this->login_field => $user, $this->password_field => $pass);
return $this;
}
/** @type Model $m */
$m = $this->add('Model');
$m->setSource('Array', array(is_array($user) ? $user : array($this->login_field => $user, $this->password_field => $pass)));
$m->id_field = $this->login_field;
$this->setModel($m);
return $this;
}