As the title describes. ive looked into the actions/registration.php but only see the FORWARD HTTP_REFERER option affecting the actions, it cant be as simple as changing the site URL correct? lol
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by RaĆ¼l Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
- Shouvik Mukherjee@shouvik
Shouvik Mukherjee - 0 likes
- Ivan D Popov@Shadowpark
Ivan D Popov - 0 likes
- iconMatrix@SteveAquila
iconMatrix - 0 likes
- Ivan D Popov@Shadowpark
Ivan D Popov - 0 likes
- Ivan D Popov@Shadowpark
Ivan D Popov - 0 likes
- iionly@iionly
iionly - 0 likes
- Trajan@Trajan
Trajan - 0 likes
You must log in to post replies.You would to remove the gatekeeper() from the start.php of the riverdashboard mod and forward to /pg/dashboard on the actions/register.php file.
Untested code:
on /actions/register.php replace the line no. 64 with
forward(pg/dashboard);
alrighty, so it forwards to the dashboard on login but only if already logged in as a differrent user, registering the other aswell but, if logged out, the page states on an elgg echo "you must be logged in to view that page"
So, my deduction is that we need a short action string to execute something like follows, in succession on the submission of the registration variables (button clicked; "register" with all fields filled) ***$logout-cookied-user, register$ -> $login(username,password) -> forward('pg/dashboard');***
(sidenote, how would i set the page to redirect to the dashboard instead of the index if theu ser is already logged in?")
void pcntl_exec ( string $path [, array $args [, array $envs ]] )
seems to be headed in the right direction, just how wouldi change the syntac to make it work with this situation? php noob here :P but im learning ^_^
I think you can do that in mod/your_theme/views/index.php
if (isloggedin()) {
forward('pg/dashboard/');
}
im using a customized xuum mod, I dont think the handle is available in that index, couldnt find it in a search of the code, but after insterting it there was no result.
any more tips on this one guys?
You could use the LoginRedirector plugin:
http://community.elgg.org/pg/plugins/project/384766/developer/jdalsem/loginredirector
It allows to redirect users to dashboard, profile or a custom page. It can also be configured for a different redirect on the first login after registration. If the plugin is not 100% what you need, I'm sure you can take its code as a starting point at least.
Find the action file (most likely seems to be register)
where the forward is at the bottom change to the following:
If you look at Shouvik's post you will also find another answer. Go to root/mod/riverdashboard/index.php
at the top there should be the following:
if so, remove it. Then non-loggedin users can view the dashboard.