A User only for the Frontend

Hey there,

so i have a userfrosting site with a webpage front for every clients to see, a backend for the working part for the staff and now i need to extend the front-end with a part only available with a login and a user that has a login but no access to the backend, only to the login-protected front-end page.

Is this possible?

  1. To add a user to be able to login without access to the backend/dashboard?
    if so… can someone point me in the right direction?

  2. Make a page of the frontend only accessible for a logged in user… and if not logged in show a text?

Has someone made something like this an is able to help me?

For Anyone interested: made a ServicesProvider

<?php namespace UserFrosting\Sprinkle\Site\ServicesProvider; use Psr\Http\Message\ResponseInterface as Response; use Psr\Http\Message\ServerRequestInterface as Request; use UserFrosting\Sprinkle\Core\Facades\Debug; /** * Registers services for my site Sprinkle */ class ServicesProvider { /** * Register my site services. * * @param Container $container A DI container implementing ArrayAccess and psr-container. */ public function register($container) { /** * Returns a callback that handles setting the `UF-Redirect` header after a successful login. * * Overrides the service definition in the account Sprinkle. */ $container['redirect.onLogin'] = function ($c) { /** * This method is invoked when a user completes the login process. * * Returns a callback that handles setting the `UF-Redirect` header after a successful login. * @param \Psr\Http\Message\ServerRequestInterface $request * @param \Psr\Http\Message\ResponseInterface $response * @param array $args * @return \Psr\Http\Message\ResponseInterface */ return function (Request $request, Response $response, array $args) use ($c) { return $response->withHeader('UF-Redirect', $c->router->pathFor('index')); }; }; } }

Then added a new Role without any Permissions attached and created the Guest-User…

Another Update
the ServicesProvider is not needed… just the guest user with no access to any right is quite enough