- // Convert usernames to ids.
- if ( isset( $this->mOptions['email-blacklist'] ) ) {
- if ( $this->mOptions['email-blacklist'] ) {
- $value = $this->mOptions['email-blacklist'];
- // Email Blacklist may be an array of ids or a string of new line
- // delimnated user names.
- if ( is_array( $value ) ) {
- $ids = array_filter( $value, 'is_numeric' );
- } else {
- $lookup = CentralIdLookup::factory();
- $ids = $lookup->centralIdsFromNames( explode( "\n", $value ), $this );
- }
- $this->mOptions['email-blacklist'] = $ids;
- $saveOptions['email-blacklist'] = implode( "\n", $this->mOptions['email-blacklist'] );
- } else {
- // If the blacklist is empty, set it to null rather than an empty string.
- $this->mOptions['email-blacklist'] = null;
- }
- }
-