/** * Retrieves universally unique ID (UUID) of current user. * * @return string UUID of user e.g. for storing related data in a database */ public function getUUID() { $uuid = $this->getProperty('uuid'); if (strlen(trim($uuid)) < 36) { $uuid = uuid::createRandom(); $this->setProperty('uuid', $uuid); } return $uuid; }