X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Flostpass.php;h=455a9b1e2eed697580cd17fb8e4dcfe2b53da43d;hb=221cfa8c22b724228ed24618569cabcae582d331;hp=122024d26b7594c7d7e7a8f716356bbeed4c0f9e;hpb=dac1dbd3e963be0606d8bc29ad6b3085f1c83105;p=friendica.git diff --git a/mod/lostpass.php b/mod/lostpass.php index 122024d26b..455a9b1e2e 100644 --- a/mod/lostpass.php +++ b/mod/lostpass.php @@ -4,7 +4,7 @@ require_once('include/email.php'); require_once('include/enotify.php'); require_once('include/text.php'); -function lostpass_post(&$a) { +function lostpass_post(App $a) { $loginame = notags(trim($_POST['login-name'])); if(! $loginame) @@ -15,7 +15,7 @@ function lostpass_post(&$a) { dbesc($loginame) ); - if(! dbm::is_result($r)) { + if (! dbm::is_result($r)) { notice( t('No valid account found.') . EOL); goaway(z_root()); } @@ -77,7 +77,7 @@ function lostpass_post(&$a) { } -function lostpass_content(&$a) { +function lostpass_content(App $a) { if(x($_GET,'verify')) { @@ -87,7 +87,7 @@ function lostpass_content(&$a) { $r = q("SELECT * FROM `user` WHERE `pwdreset` = '%s' LIMIT 1", dbesc($hash) ); - if(! dbm::is_result($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; } @@ -102,7 +102,9 @@ function lostpass_content(&$a) { dbesc($new_password_encoded), intval($uid) ); - if($r) { + + /// @TODO Is dbm::is_result() okay here? + if ($r) { $tpl = get_markup_template('pwdreset.tpl'); $o .= replace_macros($tpl,array( '$lbl1' => t('Password Reset'),