현재 새 프로젝트를 만들고 로그인 시스템을 만들고 있습니다. 어떤 이유로 그것은 역할 테이블을 찾는 것 같습니다? 이것은 지금까지 내 구조 :Database_Exception [1146] : 'database.roles'테이블이 존재하지 않습니다. [전체 롤을`roles`에서 표시]
컨트롤러
public function action_index()
{
//Check login
if (Auth::instance()->logged_in()):
HTTP::redirect('/', 302);
endif;
if (Request::current()->post()):
if(Auth::instance()->login($_POST['username'], $_POST['password'])):
echo Debug::vars($_POST); exit;
endif;
endif;
$view = View::factory('index/home');
$index_page = $view->render();
$this->response->body($index_page);
}
모델
class Model_User extends Model_Auth_User {
protected $_table_name = "users";
protected $_primary_val = "user_id";
protected $_table_columns = array(
'user_id' => array('type' => 'int'),
'team_id' => array('type' => 'int'),
'username' => array('type' => 'string'),
'password' => array('type' => 'string'),
);
내가 점점 오전 오류가
이Database_Exception [ 1146 ]: Table 'database.roles' doesn't exist [ SHOW FULL COLUMNS FROM `roles` ]
사람이 설명 할 수 있습니다 이유는을 찾고 있습니다 역할이라고 부르는 테이블? 데이터베이스의 테이블을 사용자라고합니다.
무엇 낮은 오류 : ORM의 모듈 폴더에서
당신은 기본 인증에 사용되는 SQL 스키마를 찾을 수 있습니다. 모든 인증 모듈은 일부 데이터베이스 저장소에 의존해야하며, rdb는 redis로 mysql 또는 nosql입니다. 모듈 api 및 설명을 읽는 것이 좋습니다. – fayhot