]> git.mxchange.org Git - friendica.git/blobdiff - mod/lostpass.php
Merge pull request #3986 from MrPetovan/task/admin-block-list
[friendica.git] / mod / lostpass.php
index a2e69ffb090d2422a7f5253ee731735ddd53d961..b3304fda12bba312b3149025bb21f3f8c76b2107 100644 (file)
@@ -1,11 +1,13 @@
 <?php
-
+/**
+ * @file mod/lostpass.php
+ */
 use Friendica\App;
 use Friendica\Core\System;
+use Friendica\Database\DBM;
 
-require_once('include/email.php');
-require_once('include/enotify.php');
-require_once('include/text.php');
+require_once 'include/enotify.php';
+require_once 'include/text.php';
 
 function lostpass_post(App $a) {
 
@@ -18,7 +20,7 @@ function lostpass_post(App $a) {
                dbesc($loginame)
        );
 
-       if (! dbm::is_result($r)) {
+       if (! DBM::is_result($r)) {
                notice( t('No valid account found.') . EOL);
                goaway(System::baseUrl());
        }
@@ -69,7 +71,7 @@ function lostpass_post(App $a) {
        $body = sprintf($body, $resetlink, System::baseUrl(), $email);
 
        notification(array(
-               'type' => "SYSTEM_EMAIL",
+               'type' => SYSTEM_EMAIL,
                'to_email' => $email,
                'subject'=> sprintf( t('Password reset requested at %s'),$sitename),
                'preamble'=> $preamble,
@@ -90,7 +92,7 @@ function lostpass_content(App $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;
                }
@@ -106,7 +108,7 @@ function lostpass_content(App $a) {
                        intval($uid)
                );
 
-               /// @TODO Is dbm::is_result() okay here?
+               /// @TODO Is DBM::is_result() okay here?
                if ($r) {
                        $tpl = get_markup_template('pwdreset.tpl');
                        $o .= replace_macros($tpl,array(
@@ -145,7 +147,7 @@ function lostpass_content(App $a) {
                        $body = sprintf($body, System::baseUrl(), $email, $new_password);
 
                        notification(array(
-                               'type' => "SYSTEM_EMAIL",
+                               'type' => SYSTEM_EMAIL,
                                'to_email' => $email,
                                'subject'=> sprintf( t('Your password has been changed at %s'),$sitename),
                                'preamble'=> $preamble,