I have found out how to redirect the user to an other page after Login
elgg_register_event_handler('login', 'user', 'after_login_redirect');
function after_login_redirect($event, $type, $user) {
$url = elgg_get_site_url()."profile/".$user->username;
forward($url);
}
But how can I redirect the user after incorrectly login to the registration-page?
And also I am looking for a possibility to redirect the user to the registration page, if he is not loggedin and try to watch a page for only loggedin useres (at the moment the redirect goes to the startpage)
Thanks in advance
Tobi
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.