You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
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.
The text was updated successfully, but these errors were encountered:
We should also notify all parties that the account has been removed from the previous site. The current site's user should get an admin notice, and the previous site's admin should get an email.
It might be simpler to just prevent adding the new account if we detect it's being used elsewhere. That way the admin is responsible for removing it and dealing with the consequences.
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:
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.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.
The text was updated successfully, but these errors were encountered: