protected function setUser($user)
    {
        if (!$this->isValidUsername($user)) {
            throw new \InvalidArgumentException("Invalid username '$user': double colon not allowed");
        }
        
        $this->user = (string)$user;
    }