Skip to content

Navigation Menu

Sign in
Sign up

Prevent same account on multiple sites in Multisite #256

Open

Description

If SupportFlow is running in a Multisite instance, we should prevent the same account from being used on multiple sites, because that could result in messages being delivered to both.

See https://wordpress.slack.com/archives/events/p1447084257000192

This is my first thought on how to approach it:

  1. We'd have a site-wide option with an array that maps a hash of the {imap hostname, smtp hostname, account username} to the site ID. e.g., array( '234adsfa3h42af234' => 23, '23jadf2348adfs324' => 104, etc ). The hash should be the key instead of the value, because there can be multiple unique accounts on a single site, and the array entry would be overridden if the ID was the key.

  2. Whenever a new account is added, the option is checked to see if that hash exists in the array. If it does, then the account is removed from that site and added to the current site, and the hash is updated. If the hash doesn't already exist, then the account is added and the hash is added to the option.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      AltStyle によって変換されたページ (->オリジナル) /