'Clear other sessions of the current user if `deny_multiple_sessions` is not set'

def clear_active_sessions(self):

    if (not (cint(frappe.conf.get(u'deny_multiple_sessions')) or cint(frappe.db.get_system_setting(u'deny_multiple_sessions')))):
        return
    if (frappe.session.user != u'Guest'):
        clear_sessions(frappe.session.user, keep_current=True)
