After login to a specific page?

crnogorac081

Web developer

johnbroeckaert


Ruud

You cannot do that by using the redirect parameter. Before logged-in you don't know what group the user will be in.

I like the idea, so I made a small droplet to handle this for you.
It is published here: https://dev4me.com/droplets/other/go-to-grouppage-after-login/

Just set one or more of these lines in the top of the droplet:

$urllist[group_id] = WB_URL.'/pages/page-for-that group.php';

..or when using shorturl

$urllist[group_id] = WB_URL.'/page-for-that group/';

[url=https://dev4me.com/modules-snippets/]Dev4me - WebsiteBaker modules[/url] - [url=https://wbhelp.org/]WBhelp.org[/url]

johnbroeckaert

Hi @crnogorac081,

There is a seperate page for every group. Group A has to go to page A. Group B has to go to page B. etc.
For each new group, there will be a new page with the name of that group.

Is this clear enough.

The login is only for members of a group. Other users stay on the public pages.

crnogorac081

you must customize login droplet..

you must give us more info which group to go where..
Web developer

johnbroeckaert

Maybe I should explain the problem.
There are a number of user groups. Each user group must go to another OWN user group page after login.

As far as I can see I can't use the loginbox droplet because there is only room for a 'static' page there.

I'm now trying the template madoven, because there is already a login in the template, to get so far that it switches to another page after login.
Unfortunately I am not such a coder hence my question here. :|

john

Ruud

Normally the login page is shown when a user wants to access a page that has access set to registered.
Linking to that page will first show the login page and after a succesfull login it will redirect to the original linked page.

If you use a loginbox in a normal page you can add a hidden field (in the login form) that holds the url to be used after succesfull login.

The standard droplet to generate a loginform has this built in already.
Use:
[[LoginBox?redirect=url]]

So just put this droplet - with the redirect parameter - somewhere in your template or in a normal wysiwyg page.
[url=https://dev4me.com/modules-snippets/]Dev4me - WebsiteBaker modules[/url] - [url=https://wbhelp.org/]WBhelp.org[/url]

johnbroeckaert

@crnogorac081

Quotethere is a redrect in core files
I don't know what you mean by that. It is in the frontend that i want to send a user who logged in to an other page.
cheers

crnogorac081

there is a redrect in core files, but I didnt see the option in backend.. You would need to change the core.
Web developer

johnbroeckaert

Hi,

On a site I want the visitor to be referred to another page after login. Is that possible?
wb2.10
php7.1.x

THANX