]> git.mxchange.org Git - friendica.git/blobdiff - src/Model/Register.php
Merge pull request #8230 from AlfredSK/AlfredSK-statistics-query
[friendica.git] / src / Model / Register.php
index 8a03f379a604daca027233e31b8503d8a7fee0b0..fa8fb7bdbbc194b45244a8c13f8dd31f267f7d72 100644 (file)
@@ -1,8 +1,24 @@
 <?php
-
 /**
- * @file src/Model/Register.php
+ * @copyright Copyright (C) 2020, Friendica
+ *
+ * @license GNU AGPL version 3 or any later version
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ *
  */
+
 namespace Friendica\Model;
 
 use Friendica\Database\DBA;
@@ -11,8 +27,6 @@ use Friendica\Util\Strings;
 
 /**
  * Class interacting with the register database table
- *
- * @author Hypolite Petovan <mrpetovan@gmail.com>
  */
 class Register
 {
@@ -83,7 +97,7 @@ class Register
         */
        public static function createForInvitation()
        {
-               $code = Strings::getRandomName(8) . srand(1000, 9999);
+               $code = Strings::getRandomName(8) . random_int(1000, 9999);
 
                $fields = [
                        'hash' => $code,