private function deleteOldSessions()
    {
        // 2% chance of kicking idle sessions
        if (mt_rand(0, 49)) {
            return false;
        }

        $sessions = new UsersSessionEntityRepository();
        $sessions->setOnlyOutdated();
        $sessions->deleteObjectCollection();

        return true;
    }
private function deleteOldSessions()
    {
        // 2% chance of kicking idle sessions
        if (mt_rand(0, 49)) {
            return false;
        }

        $sessions = new UsersSessionEntityRepository();
        $sessions->setOnlyOutdated();
        $sessions->deleteObjectCollection();

        return true;
    }
private function deleteOldSessions ( ) { // 2% chance of kicking idle sessions if ( mt_rand ( 0 , 49 ) ) { return false ; } $ sessions = new UsersSessionEntityRepository ( ) ; $ sessions -> setOnlyOutdated ( ) ; $ sessions -> deleteObjectCollection ( ) ; return true ; }
Delete outdated sessions for users that are no longer logged-in
@return bool sessions are deleted
Delete outdated sessions for users that are no longer logged - in