diff options
author | Marvin Borner | 2018-06-28 21:15:57 +0200 |
---|---|---|
committer | Marvin Borner | 2018-06-28 21:15:57 +0200 |
commit | 15793496e8d56769c792cf39673c6e6dea3ec4d9 (patch) | |
tree | 1038f86603cdb52d7d9be5f125e5a88a25086995 /main/app/sprinkles/account/src/Util/Util.php | |
parent | 8781338896a0cfb47c871a0ecb13cd3fdee09d8e (diff) |
Preparing for complete rewrite..
Diffstat (limited to 'main/app/sprinkles/account/src/Util/Util.php')
-rw-r--r-- | main/app/sprinkles/account/src/Util/Util.php | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/main/app/sprinkles/account/src/Util/Util.php b/main/app/sprinkles/account/src/Util/Util.php deleted file mode 100644 index f3a08a2..0000000 --- a/main/app/sprinkles/account/src/Util/Util.php +++ /dev/null @@ -1,39 +0,0 @@ -<?php
-/**
- * UserFrosting (http://www.userfrosting.com)
- *
- * @link https://github.com/userfrosting/UserFrosting
- * @license https://github.com/userfrosting/UserFrosting/blob/master/licenses/UserFrosting.md (MIT License)
- */
-
-namespace UserFrosting\Sprinkle\Account\Util;
-
-use UserFrosting\Sprinkle\Core\Util\Util as CoreUtil;
-
-/**
- * Util Class
- *
- * Static utility functions for the account Sprinkle.
- *
- * @author Alex Weissman (https://alexanderweissman.com)
- */
-class Util
-{
- /**
- * Generate a random, unique username from a list of adjectives and nouns.
- */
- static public function randomUniqueUsername($classMapper, $maxLength, $maxTries = 10) {
- for ($n = 1; $n <= 3; $n++) {
- for ($m = 0; $m < 10; $m++) {
- // Generate a random phrase with $n adjectives
- $suggestion = CoreUtil::randomPhrase($n, $maxLength, $maxTries, '.');
- if (!$classMapper->staticMethod('user', 'where', 'user_name', $suggestion)->first()) {
- return $suggestion;
- }
- }
- }
-
- return '';
- }
-
-}
|