/** * User constructor. */ public function __construct() { // Construct parent parent::__construct(); // Set communications as an array $this->viewedCommunications = new ArrayCollection(); // Set default user role if (empty($this->roles)) { $this->roles = Globals::getDefaultRoles(); } // Set dafault user language if (empty($this->language)) { $this->language = Globals::getDefaultLanguage(); } }