]> git.mxchange.org Git - friendica.git/blobdiff - mod/lostpass.php
get_basepath() uses a lot $this (which means object-referenced calls, or
[friendica.git] / mod / lostpass.php
index 0c4bb1a8335ffc38a9cce9a08a86df5bcc99b799..3dca3a8b81d51d80137b25c86408a3257094d7e8 100644 (file)
@@ -4,7 +4,6 @@ require_once('include/email.php');
 require_once('include/enotify.php');
 require_once('include/text.php');
 
-if(! function_exists('lostpass_post')) {
 function lostpass_post(&$a) {
 
        $loginame = notags(trim($_POST['login-name']));
@@ -16,7 +15,7 @@ function lostpass_post(&$a) {
                dbesc($loginame)
        );
 
-       if(! count($r)) {
+       if(! dbm::is_result($r)) {
                notice( t('No valid account found.') . EOL);
                goaway(z_root());
        }
@@ -75,10 +74,10 @@ function lostpass_post(&$a) {
                'body' => $body));
 
        goaway(z_root());
+
 }
-}
 
-if(! function_exists('lostpass_content')) {
+
 function lostpass_content(&$a) {
 
 
@@ -89,7 +88,7 @@ function lostpass_content(&$a) {
                $r = q("SELECT * FROM `user` WHERE `pwdreset` = '%s' LIMIT 1",
                        dbesc($hash)
                );
-               if(! count($r)) {
+               if(! dbm::is_result($r)) {
                        $o =  t("Request could not be verified. \x28You may have previously submitted it.\x29 Password reset failed.");
                        return $o;
                }
@@ -165,5 +164,5 @@ function lostpass_content(&$a) {
 
                return $o;
        }
-}
+
 }