• Hi,

    Not sure if this is a WordPress or UM online users plugin thing but I have a list of a set type of users that are logged in that need to be shown as online. If the user doesnt do anything on the site for 15 minutes theyre taken off the online list. Is there anyway around this so to show them as online as long as are logged into the site.

    Thanks in advance

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Ultimate Member Support

    (@ultimatemembersupport)

    Hi @projektsandbox,

    This feature would require customization and potentially can eat up a lot of server resources.

    Regards.

    Thread Starter projektsandbox

    (@projektsandbox)

    Hi, thanks for your reply!

    How can I get in touch with you guys about the customization?

    Also its limited to 15 users, surely that wouldnt hog to much server?

    Thanks again

    Thread Starter projektsandbox

    (@projektsandbox)

    Is it possible for you guys to do the customization of this?

    Or could you please point me in the right direction of this?

    Thread Starter projektsandbox

    (@projektsandbox)

    would i need to edit in um-online/core/um-online-init.php

    if ( ( current_time('timestamp') - $last_seen ) > ( 60 * 15 ) )

    any help is much apperciated

    `// Send a maximum of once per period
    $last_send = $this->get_last_update();
    if( $last_send && $last_send > strtotime( ‘-15 minutes’ ) )
    return;

    // We have to check if each user was last seen in the previous x
    if ( is_array( $this->users ) ) {
    foreach( $this->users as $user_id => $last_seen ) {
    if ( ( current_time(‘timestamp’) – $last_seen ) > ( 60 * 15 ) ) {
    // Time now is more than x since he was last seen
    // Remove user from online list
    unset( $this->users[$user_id] );
    }
    }
    update_option(‘um_online_users’, $this->users );
    }

    update_option( ‘um_online_users_last_updated’, time() );`

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Online Users Plugin’ is closed to new replies.