/** * User constructor. * * @param string $username * @param string $password * @param string $card * @param string $image * @param string $roleId * @param User $user * @param string $displayId */ public function __construct($username, $password, $card, $image, $roleId, User $user, $displayId = null) { parent::__construct(); $this->displayId = $displayId === null ? com_create_guid() : $displayId; $this->username = $username; $this->password = $password; $this->card = $card; $this->image = $image; $this->roleId = $roleId; $this->visible = true; $this->addedDate = new \DateTime(); $this->addedBy = $user->getUsername(); $this->updatedDate = null; $this->updatedBy = null; }