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']));
dbesc($loginame)
);
- if(! count($r)) {
+ if(! dbm::is_result($r)) {
notice( t('No valid account found.') . EOL);
goaway(z_root());
}
'body' => $body));
goaway(z_root());
+
}
-}
-if(! function_exists('lostpass_content')) {
+
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;
}
return $o;
}
-}
+
}