src/Classes/AdldapUsers.php
public function getLastLogon($username)
    {
        $this->adldap->utilities()->validateNotNull('Username', $username);

        $userInfo = $this->info($username, ['lastlogontimestamp']);

        if (is_array($userInfo) && array_key_exists('lastlogontimestamp', $userInfo)) {
            return AdldapUtils::convertWindowsTimeToUnixTime($userInfo['lastlogontimestamp']);
        }

        return false;
    }
public function getLastLogon($username)
    {
        $this->adldap->utilities()->validateNotNull('Username', $username);

        $userInfo = $this->info($username, ['lastlogontimestamp']);

        if (is_array($userInfo) && array_key_exists('lastlogontimestamp', $userInfo)) {
            return AdldapUtils::convertWindowsTimeToUnixTime($userInfo['lastlogontimestamp']);
        }

        return false;
    }
public function getLastLogon ( $ username ) { $ this -> adldap -> utilities ( ) -> validateNotNull ( 'Username' , $ username ) ; $ userInfo = $ this -> info ( $ username , [ 'lastlogontimestamp' ] ) ; if ( is_array ( $ userInfo ) && array_key_exists ( 'lastlogontimestamp' , $ userInfo ) ) { return AdldapUtils :: convertWindowsTimeToUnixTime ( $ userInfo [ 'lastlogontimestamp' ] ) ; } return false ; }
Get the last logon time of any user as a Unix timestamp.

@param string $username

@return float|bool|string
Get the last logon time of any user as a Unix timestamp .