Merge pull request #5259 from rabuzarus/20180616_-_magic_auth_test_2
authorHypolite Petovan <mrpetovan@gmail.com>
Thu, 21 Jun 2018 00:15:14 +0000 (20:15 -0400)
committerGitHub <noreply@github.com>
Thu, 21 Jun 2018 00:15:14 +0000 (20:15 -0400)
port hubzillas OpenWebAuth - don't initiate magic auth if the contact is allready authentificated

src/Model/Profile.php

index 0bb18e1..31d9fe8 100644 (file)
@@ -1020,7 +1020,7 @@ class Profile
 
                                $contact = dba::selectFirst('contact',['id', 'url'], ['id' => $cid]);
 
-                               if (DBM::is_result($contact) && remote_user() && remote_user() === $contact['id']) {
+                               if (DBM::is_result($contact) && remote_user() && remote_user() == $contact['id']) {
                                        // The visitor is already authenticated.
                                        return;
                                }