]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Settings/Account.php
Added getBytesFromShorthand at the remaining places.
[friendica.git] / src / Module / Settings / Account.php
index fc6c3972a537c3ccb42ebbcccd3ddb0444a4605f..4217b1e88d9af900f8d09fce9cd4cdb6ff9a143e 100644 (file)
@@ -113,12 +113,9 @@ class Account extends BaseSettings
                                        $err .= DI::l10n()->t('Invalid email.');
                                }
                                //  ensure new email is not the admin mail
-                               if (DI::config()->get('config', 'admin_email')) {
-                                       $adminlist = explode(",", str_replace(" ", "", strtolower(DI::config()->get('config', 'admin_email'))));
-                                       if (in_array(strtolower($email), $adminlist)) {
-                                               $err .= DI::l10n()->t('Cannot change to that email.');
-                                               $email = $user['email'];
-                                       }
+                               if (in_array(strtolower($email), User::getAdminEmailList())) {
+                                       $err .= DI::l10n()->t('Cannot change to that email.');
+                                       $email = $user['email'];
                                }
                        }
 
@@ -375,7 +372,7 @@ class Account extends BaseSettings
                                                // "http" or "@" to be present in the string.
                                                // All other fields from the row will be ignored
                                                if ((strpos($csvRow[0], '@') !== false) || Network::isValidHttpUrl($csvRow[0])) {
-                                                       Worker::add(Worker::PRIORITY_MEDIUM, 'AddContact', DI::userSession()->getLocalUserId(), $csvRow[0]);
+                                                       Worker::add(Worker::PRIORITY_MEDIUM, 'AddContact', DI::userSession()->getLocalUserId(), trim($csvRow[0], '@'));
                                                } else {
                                                        Logger::notice('Invalid account', ['url' => $csvRow[0]]);
                                                }