Definition at line 26 of file PersistentLoginService.php.
 
◆ __construct()
      
        
          | Elgg\PersistentLoginService::__construct  | 
          ( | 
          Database  | 
          $db,  | 
        
        
           | 
           | 
          \ElggSession  | 
          $session,  | 
        
        
           | 
           | 
          \ElggCrypto  | 
          $crypto,  | 
        
        
           | 
           | 
          array  | 
          $cookie_config,  | 
        
        
           | 
           | 
            | 
          $cookie_token,  | 
        
        
           | 
           | 
            | 
          $time = null  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Constructor. 
- Parameters
 - 
  
    | Database | $db | The DB service  | 
    | \ElggSession | $session | The Elgg session  | 
    | \ElggCrypto | $crypto | The cryptography service  | 
    | array | $cookie_config | The persistent login cookie settings  | 
    | string | $cookie_token | The token from the request cookie  | 
    | int | $time | The current time  | 
  
   
Definition at line 38 of file PersistentLoginService.php.
 
 
◆ bootSession()
      
        
          | Elgg\PersistentLoginService::bootSession  | 
          ( | 
           | ) | 
           | 
        
      
 
Boot the persistent login session, possibly returning the user who should be silently logged in. 
- Returns
 - \ElggUser|null 
 
Definition at line 110 of file PersistentLoginService.php.
 
 
◆ generateToken()
  
  
      
        
          | Elgg\PersistentLoginService::generateToken  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
protected   | 
  
 
Generate a random token (base 64 URL) 
The first char is always "z" to indicate the value has more entropy than the previously generated ones.
- Returns
 - string 
 
Definition at line 306 of file PersistentLoginService.php.
 
 
◆ getUserFromHash()
      
        
          | Elgg\PersistentLoginService::getUserFromHash  | 
          ( | 
            | 
          $hash | ) | 
           | 
        
      
 
Find a user with the given hash. 
- Parameters
 - 
  
    | string | $hash | The hashed token | 
  
   
- Returns
 - \ElggUser|null 
 
Definition at line 156 of file PersistentLoginService.php.
 
 
◆ handleDbException()
  
  
      
        
          | Elgg\PersistentLoginService::handleDbException  | 
          ( | 
          \DatabaseException  | 
          $exception,  | 
         
        
           | 
           | 
            | 
          $default = null  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
protected   | 
  
 
Swallow a schema not upgraded exception, otherwise rethrow it. 
- Parameters
 - 
  
    | \DatabaseException | $exception | The exception to handle  | 
    | string | $default | The value to return if the table doesn't exist yet | 
  
   
- Returns
 - mixed
 
- Exceptions
 - 
  
  
 
Definition at line 226 of file PersistentLoginService.php.
 
 
◆ handlePasswordChange()
      
        
          | Elgg\PersistentLoginService::handlePasswordChange  | 
          ( | 
          \ElggUser  | 
          $subject,  | 
        
        
           | 
           | 
          \ElggUser  | 
          $modifier = null  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Handle a password change. 
- Parameters
 - 
  
    | \ElggUser | $subject | The user whose password changed  | 
    | \ElggUser | $modifier | The user who changed the password | 
  
   
- Returns
 - void 
 
Definition at line 95 of file PersistentLoginService.php.
 
 
◆ hashToken()
  
  
      
        
          | Elgg\PersistentLoginService::hashToken  | 
          ( | 
            | 
          $token | ) | 
           | 
         
       
   | 
  
protected   | 
  
 
 
◆ isLegacyToken()
  
  
      
        
          | Elgg\PersistentLoginService::isLegacyToken  | 
          ( | 
            | 
          $token | ) | 
           | 
         
       
   | 
  
protected   | 
  
 
Is the given token a legacy MD5 hash? 
- Parameters
 - 
  
    | string | $token | The token to analyze | 
  
   
- Returns
 - bool 
 
Definition at line 317 of file PersistentLoginService.php.
 
 
◆ makeLoginPersistent()
      
        
          | Elgg\PersistentLoginService::makeLoginPersistent  | 
          ( | 
          \ElggUser  | 
          $user | ) | 
           | 
        
      
 
Make the user's login persistent. 
- Parameters
 - 
  
    | \ElggUser | $user | The user who logged in | 
  
   
- Returns
 - void 
 
Definition at line 63 of file PersistentLoginService.php.
 
 
◆ removeAllHashes()
  
  
      
        
          | Elgg\PersistentLoginService::removeAllHashes  | 
          ( | 
          \ElggUser  | 
          $user | ) | 
           | 
         
       
   | 
  
protected   | 
  
 
Remove all the hashes associated with a user. 
- Parameters
 - 
  
    | \ElggUser | $user | The user for whom we're removing hashes | 
  
   
- Returns
 - void 
 
Definition at line 242 of file PersistentLoginService.php.
 
 
◆ removeHash()
  
  
      
        
          | Elgg\PersistentLoginService::removeHash  | 
          ( | 
            | 
          $hash | ) | 
           | 
         
       
   | 
  
protected   | 
  
 
Remove a hash from the DB. 
- Parameters
 - 
  
    | string | $hash | The hashed token to remove (unused before 1.9)  | 
  
   
- Returns
 - void 
 
Definition at line 205 of file PersistentLoginService.php.
 
 
◆ removePersistentLogin()
      
        
          | Elgg\PersistentLoginService::removePersistentLogin  | 
          ( | 
           | ) | 
           | 
        
      
 
 
◆ replaceLegacyToken()
      
        
          | Elgg\PersistentLoginService::replaceLegacyToken  | 
          ( | 
          \ElggUser  | 
          $logged_in_user | ) | 
           | 
        
      
 
Replace the user's token if it's a legacy hexadecimal token. 
- Parameters
 - 
  
    | \ElggUser | $logged_in_user | The logged in user | 
  
   
- Returns
 - void 
 
Definition at line 139 of file PersistentLoginService.php.
 
 
◆ setCookie()
  
  
      
        
          | Elgg\PersistentLoginService::setCookie  | 
          ( | 
            | 
          $token | ) | 
           | 
         
       
   | 
  
protected   | 
  
 
Store the token in the client cookie (or remove the cookie) 
- Parameters
 - 
  
    | string | $token | Empty string to remove cookie | 
  
   
- Returns
 - void 
 
Definition at line 271 of file PersistentLoginService.php.
 
 
◆ setSession()
  
  
      
        
          | Elgg\PersistentLoginService::setSession  | 
          ( | 
            | 
          $token | ) | 
           | 
         
       
   | 
  
protected   | 
  
 
Store the token in the session (or remove it from the session) 
- Parameters
 - 
  
    | string | $token | The token to store in session. Empty string to remove. | 
  
   
- Returns
 - void 
 
Definition at line 290 of file PersistentLoginService.php.
 
 
◆ storeHash()
  
  
      
        
          | Elgg\PersistentLoginService::storeHash  | 
          ( | 
          \ElggUser  | 
          $user,  | 
         
        
           | 
           | 
            | 
          $hash  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
protected   | 
  
 
Store a hash in the DB. 
- Parameters
 - 
  
    | \ElggUser | $user | The user for whom we're storing the hash  | 
    | string | $hash | The hashed token | 
  
   
- Returns
 - void 
 
Definition at line 184 of file PersistentLoginService.php.
 
 
◆ $_callable_elgg_set_cookie
      
        
          | Elgg\PersistentLoginService::$_callable_elgg_set_cookie = 'elgg_set_cookie' | 
        
      
 
 
◆ $_callable_get_user
      
        
          | Elgg\PersistentLoginService::$_callable_get_user = 'get_user' | 
        
      
 
 
◆ $_callable_sleep
      
        
          | Elgg\PersistentLoginService::$_callable_sleep = 'sleep' | 
        
      
 
 
◆ $cookie_config
  
  
      
        
          | Elgg\PersistentLoginService::$cookie_config | 
         
       
   | 
  
protected   | 
  
 
 
◆ $cookie_token
  
  
      
        
          | Elgg\PersistentLoginService::$cookie_token | 
         
       
   | 
  
protected   | 
  
 
 
◆ $crypto
  
  
      
        
          | Elgg\PersistentLoginService::$crypto | 
         
       
   | 
  
protected   | 
  
 
 
◆ $db
  
  
      
        
          | Elgg\PersistentLoginService::$db | 
         
       
   | 
  
protected   | 
  
 
 
◆ $session
  
  
      
        
          | Elgg\PersistentLoginService::$session | 
         
       
   | 
  
protected   | 
  
 
 
◆ $table
  
  
      
        
          | Elgg\PersistentLoginService::$table | 
         
       
   | 
  
protected   | 
  
 
 
◆ $time
  
  
      
        
          | Elgg\PersistentLoginService::$time | 
         
       
   | 
  
protected   | 
  
 
 
The documentation for this class was generated from the following file: