I want to redirect my members to profile edit page at first login.. i saw plugins available for 1.7.x
but not available for 1.8.3 .. so is there any way so that i can redirect my new members to profile edit page for there first login...
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.
- Trajan@Trajan
Trajan - 0 likes
- meril@merilturock
meril - 0 likes
- meril@merilturock
meril - 0 likes
- Team Webgalli@webgalli
Team Webgalli - 0 likes
- Satheesh PM@thuvalpakshi
Satheesh PM - 0 likes
- Trajan@Trajan
Trajan - 0 likes
- Satheesh PM@thuvalpakshi
Satheesh PM - 0 likes
- DhrupDeScoop@Dhrup2000
DhrupDeScoop - 0 likes
- Kevin Jardine@kevin
Kevin Jardine - 0 likes
You must log in to post replies.Not sure if there is a plugin to actually do it but the coding is trivial:
In a plugin's start.php file add the following:
Thanks Trajan let me try it ....
for redirecting user to profile edit page... in forward("PUT URL IN HERE") I dont know how to give it as.. the url is like this "[base url]/profile/username/edit" for the username how should i get the input of the new user.. I am not a coder so i dont know wat url to put for redirecting users to profile edit page..
Thank you
$url = $user->getURL()
for 1.8 i am using this code in my theme
not sure what prev_last_login would be if anything. Last login (from guessing) holds a timestamp and updates every time a user logs in.
@Satheesh...is prev_last_login working for you to send users to 'import'?
@trajan i just checkd by changing ==0 to !=0
it was working for me...
last_login is the last time he logged in..
prev_last_login is the 'previous' (second) (also TS) to the last time he logged in ;-)
so.. if last == 0 -> he's never logged in
else if prev_last == 0 -> he's only logged in once
else he's logged in >= 2x
In case any one looks at this.
Trajan's solution does not work because Elgg's forward() function exits immediately upon setting the location header and so the rest of the code in the login() function is not executed. This (crucially) includes the code to set the last login time! So as a result, the first login action would get repeated over and over again each time the user logs in.
I solved this by copying some of the lines from the login function to my first login function, including the bit that sets the last login time.