]> git.mxchange.org Git - friendica.git/blobdiff - src/App/Authentication.php
Only display redundant preview data with preview picture
[friendica.git] / src / App / Authentication.php
index c0408a8111e19deeac91bc1207e5cba599675370..e3d273747029b452226a9a017737706984af64f8 100644 (file)
@@ -1,7 +1,22 @@
 <?php
-
 /**
- * @file /src/Core/Authentication.php
+ * @copyright Copyright (C) 2020, Friendica
+ *
+ * @license GNU AGPL version 3 or any later version
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ *
  */
 
 namespace Friendica\App;
@@ -192,7 +207,7 @@ class Authentication
 
                // if it's an email address or doesn't resolve to a URL, fail.
                if ($noid || strpos($openid_url, '@') || !Network::isUrlValid($openid_url)) {
-                       notice($this->l10n->t('Login failed.') . EOL);
+                       notice($this->l10n->t('Login failed.'));
                        $this->baseUrl->redirect();
                }
 
@@ -255,7 +270,7 @@ class Authentication
                        }
                } catch (Exception $e) {
                        $this->logger->warning('authenticate: failed login attempt', ['action' => 'login', 'username' => Strings::escapeTags($username), 'ip' => $_SERVER['REMOTE_ADDR']]);
-                       info($this->l10n->t('Login failed. Please check your credentials.' . EOL));
+                       notice($this->l10n->t('Login failed. Please check your credentials.'));
                        $this->baseUrl->redirect();
                }
 
@@ -373,9 +388,7 @@ class Authentication
                        if ($user_record['login_date'] <= DBA::NULL_DATETIME) {
                                info($this->l10n->t('Welcome %s', $user_record['username']));
                                info($this->l10n->t('Please upload a profile photo.'));
-                               $this->baseUrl->redirect('profile_photo/new');
-                       } else {
-                               info($this->l10n->t("Welcome back %s", $user_record['username']));
+                               $this->baseUrl->redirect('settings/profile/photo/new');
                        }
                }