Documentation

Print This page

Exclude user role from the session expiration (Hook)

If you want to exclude the specific users from LoginPress session expiration. The following filter will help you achieve the task

function loginpress_exclude_role_session_callback() {
  return array( 'administrator', 'contributor' );
}
add_filter( 'loginpress_exclude_role_session', 'loginpress_exclude_role_session_callback' );

Here you can return a single value or array of the roles.