]> git.mxchange.org Git - friendica-addons.git/blobdiff - jappixmini/jappixmini.php
Merge pull request #486 from MrPetovan/task/fix-scrutinizer-issues
[friendica-addons.git] / jappixmini / jappixmini.php
index ba82a076270f4ee36b47cbeed35b286ed614dbf2..faac6a815477a45712baa2c9835628948f3a0991 100644 (file)
@@ -429,11 +429,7 @@ function jappixmini_settings_post(App $a, &$b)
                if ($encrypt) {
                        // check that Jabber password was encrypted with correct Friendica password
                        $friendica_password = trim($b['jappixmini-friendica-password']);
-                       $encrypted = hash('whirlpool',$friendica_password);
-                       $r = q("SELECT * FROM `user` WHERE `uid`=$uid AND `password`='%s'",
-                               dbesc($encrypted)
-                       );
-                       if (!count($r)) {
+                       if (!User::authenticate((int) $uid, $friendica_password)) {
                                info("Wrong friendica password!");
                                return;
                        }