if(! $email)
goaway($a->get_baseurl());
- $r = q("SELECT * FROM `user` WHERE ( `email` = '%s' OR `nickname` = '%s' ) LIMIT 1",
+ $r = q("SELECT * FROM `user` WHERE ( `email` = '%s' OR `nickname` = '%s' ) AND `verified` = 1 AND `blocked` = 0 LIMIT 1",
dbesc($email),
dbesc($email)
);
- if(! count($r))
+
+ if(! count($r)) {
+ notice( t('No valid account found.') . EOL);
goaway($a->get_baseurl());
+ }
+
$uid = $r[0]['uid'];
$username = $r[0]['username'];
intval($uid)
);
if($r)
- notice( t('Password reset request issued. Check your email.') . EOL);
+ info( t('Password reset request issued. Check your email.') . EOL);
$email_tpl = get_intltext_template("lostpass_eml.tpl");
$email_tpl = replace_macros($email_tpl, array(
'$baseurl' => $a->get_baseurl()
));
- notice("Your password has been reset." . EOL);
+ info("Your password has been reset." . EOL);
return $o;
}
-}
\ No newline at end of file
+}