function setCurrentUser(UserInterface $user)
    {
        $this->currentUser = $user;

        // accessing the current user from the
        // DI container is deprecated
        $this->app['user'] = $user;

        return $this;
    }