]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - classes/User.php
Merge branch 'tagprofile-ajax-fix' into 'nightly'
[quix0rs-gnu-social.git] / classes / User.php
index 6a12bb6642ff4dd473e98d19a21cd11a3322401c..3efaa5e72131b5ba7cda2262ba4e4879d0277b1d 100644 (file)
@@ -873,16 +873,20 @@ class User extends Managed_DataObject
             }
 
             // No luck finding anyone by that email address.
-            // TODO: Fake sending email (since we don't want to reveal which addresses exist or not)
             if (!$user instanceof User) {
-                // TRANS: Information on password recovery form if no known username or e-mail address was specified.
+                if (common_config('site', 'fakeaddressrecovery')) {
+                    // Return without actually doing anything! We fake address recovery
+                    // to avoid revealing which email addresses are registered with the site.
+                    return;
+                }
+                // TRANS: Information on password recovery form if no known e-mail address was specified.
                 throw new ClientException(_('No user with that email address exists here.'));
             }
         } else {
             // This might throw a NicknameException on bad nicknames
             $user = User::getKV('nickname', common_canonical_nickname($nore));
             if (!$user instanceof User) {
-                // TRANS: Information on password recovery form if no known username or e-mail address was specified.
+                // TRANS: Information on password recovery form if no known username was specified.
                 throw new ClientException(_('No user with that nickname exists here.'));
             }
         }