2017-01-05 2 views
0

カードのおかげでユーザーを認証するためのモジュールを作成しました。そのユーザーがWebサイトにアクセスできるかどうかを確認する必要があります。Drupal 8:Drupal Stockingセッションを停止するにはどうすればいいですか?

問題は、Drupalがセッションを管理する方法にあります。データベース内のすべてのセッションをストックして復元するので、ユーザーは自動的にログインします。これにより、ユーザーはチェックプロセスを実行しなくなります。

データベースのセッションを停止することはできますか?あなたは、ブラウザのタブが閉じられるまで、ユーザーのセッションが唯一の持続を意味して0に /sites/default/services.yml

cookie_lifetimeの設定でクッキー/セッションの寿命を設定することができますDrupalの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 
関連する問題