You are here

public function SessionLimit::getMessage in Session Limit 2.x

Same name and namespace in other branches
  1. 8 src/Services/SessionLimit.php \Drupal\session_limit\Services\SessionLimit::getMessage()

Get the logged out message for the given user.

Parameters

AccountInterface $account:

Return value

string

2 calls to SessionLimit::getMessage()
SessionLimit::_onSessionCollision__DropOldest in src/Services/SessionLimit.php
React to a session collision by dropping older sessions.
SessionLimit::_onSessionCollision__PreventNew in src/Services/SessionLimit.php
React to a session collision by preventing new sessions.

File

src/Services/SessionLimit.php, line 519

Class

SessionLimit

Namespace

Drupal\session_limit\Services

Code

public function getMessage(AccountInterface $account) {
  return t('You have been automatically logged out. Someone else has logged in with your username and password and the maximum number of @number simultaneous session(s) was exceeded. This may indicate that your account has been compromised or that account sharing is not allowed on this site. Please contact the site administrator if you suspect your account has been compromised.', [
    '@number' => $this
      ->getUserMaxSessions($account),
  ]);
}