2017-01-05 7 views
0

카드 덕분에 사용자를 인증하는 모듈을 만들었고 사용자가 웹 사이트에 액세스 할 수 있는지 확인해야합니다.Drupal 8 : Drupal 스타킹 세션을 중지하는 방법?

문제는 드루팔 (Drupal)이 세션을 관리하는 방식에 있습니다. 데이터베이스의 모든 세션을 저장하고 복원하므로 사용자가 자동으로 로그인되므로 사용자가 확인 프로세스를 거치지 않습니다.

데이터베이스의 세션을 중지 할 수 있습니까? 브라우저 탭을 닫을 때까지 사용자의 세션은 지속 의미 0 /sites/default/services.yml

cookie_lifetime 설정에서 쿠키/세션 수명을 설정할 수 있습니다 드루팔 8에서는

답변

0

, 그래서 사이트를 다시 방문하면 다시 로그인해야합니다.

예. services.yml

parameters: 
    session.storage.options: 
    # Default ini options for sessions. 
    # 
    # Some distributions of Linux (most notably Debian) ship their PHP 
    # installations with garbage collection (gc) disabled. Since Drupal depends 
    # on PHP's garbage collection for clearing sessions, ensure that garbage 
    # collection occurs by using the most common settings. 
    # @default 1 
    gc_probability: 1 
    # @default 100 
    gc_divisor: 100 
    # 
    # Set session lifetime (in seconds), i.e. the time from the user's last 
    # visit to the active session may be deleted by the session garbage 
    # collector. When a session is deleted, authenticated users are logged out, 
    # and the contents of the user's $_SESSION variable is discarded. 
    # @default 200000 
    gc_maxlifetime: 200000 
    # 
    # Set session cookie lifetime (in seconds), i.e. the time from the session 
    # is created to the cookie expires, i.e. when the browser is expected to 
    # discard the cookie. The value 0 means "until the browser is closed". 
    # @default 2000000 
    cookie_lifetime: 0