$a->internalRedirect();
}
- $pwdreset_token = autoname(12) . mt_rand(1000, 9999);
+ $pwdreset_token = Strings::getRandomName(12) . mt_rand(1000, 9999);
$fields = [
'pwdreset' => $pwdreset_token,
use Friendica\Database\DBStructure;
use Friendica\Object\Image;
use Friendica\Util\Network;
+use Friendica\Util\Strings;
/**
* Contains methods for installation purpose of Friendica
}
if ($passed2) {
- $str = autoname(8);
+ $str = Strings::getRandomName(8);
$cmd = "$phppath util/testargs.php $str";
$result = trim(shell_exec($cmd));
$passed3 = $result == $str;
*/
public static function createForInvitation()
{
- $code = autoname(8) . srand(1000, 9999);
+ $code = Strings::getRandomName(8) . srand(1000, 9999);
$fields = [
'hash' => $code,
*/
public static function generateNewPassword()
{
- return autoname(6) . mt_rand(100, 9999);
+ return Strings::getRandomName(6) . mt_rand(100, 9999);
}
/**
*
* @return string
*/
- public static function getRandomName($len) // autoname()
+ public static function getRandomName($len)
{
if ($len <= 0) {
return '';