]> git.mxchange.org Git - friendica-addons.git/commitdiff
Simplify random_string() calls
authorHypolite Petovan <mrpetovan@gmail.com>
Sun, 26 Nov 2017 02:31:10 +0000 (21:31 -0500)
committerHypolite Petovan <mrpetovan@gmail.com>
Sun, 26 Nov 2017 02:31:10 +0000 (21:31 -0500)
ifttt/ifttt.php
xmpp/xmpp.php

index 800294ffb04595c03da4fa4102682d9fe6d901dd..384b955c0b182c7350671a63203fd867d8f660d6 100644 (file)
@@ -45,7 +45,7 @@ function ifttt_settings(App $a, &$s)
        $key = PConfig::get(local_user(), 'ifttt', 'key');
 
        if (!$key) {
-               $key = substr(random_string(),0,20);
+               $key = random_string(20);
                PConfig::set(local_user(), 'ifttt', 'key', $key);
        }
 
index 867a3c06b6174f4b724cfda38a19b2cbc53d763e..e523c65c5fe3fcccb954f01c6d94d1d2bfca3f34 100644 (file)
@@ -94,7 +94,7 @@ function xmpp_plugin_settings(App $a, &$s)
 function xmpp_login()
 {
        if (!$_SESSION["allow_api"]) {
-               $password = substr(random_string(),0,16);
+               $password = random_string(16);
                PConfig::set(local_user(), "xmpp", "password", $password);
        }
 }