Resolve "Unique ID for Users" #1562

Closed
korina.cordero wants to merge 9 commits from 638-unique-id-for-users into master-fix
Showing only changes of commit d6cf2de4ab - Show all commits

View file

@ -0,0 +1,22 @@
<?php
namespace App\Service;
use Doctrine\ORM\EntityManagerInterface;
class UniqueIdGenerator
{
protected $em;
public function __construct(EntityManagerInterface $em)
{
$this->em = $em;
}
public function generateUniqueId($str_length)
{
// TODO: retry until we get a unique id
return substr(md5(time()), 0, $str_length);
}
}