Today I noticed that many members (but not all of them) who haven't logged in since signing up have a lastvisit value of 0. Because of this, their lastvisit field is showing the 1969 date when I try to display it. Do you know what might be causing this field to not update properly, and how to change the field for all members with this field as 0 to the registration date so it'll display properly?
As far as I can see it's not set on registration, so I don't see how some of your members could have a non-0 value. Added a $this->lastvisit = time(); to the register() function of the class for the next version though.
Where in 3.16 would I add that, since I'm not using the newer version?
Also, how do I go about changing all the current lastvisit of 0 to something else, like their registration date. Is there a way to do this via the WSN advanced functions page or via phpmyadmin?
I know. I'm asking about what he said in his first post:
As far as I can see it's not set on registration, so I don't see how some of your members could have a non-0 value. Added a $this->lastvisit = time(); to the register() function of the class for the next version though.
Where is the register() function and where does $this->lastvisit = time(); go in that function?
Comments on Lastvisited field missing
Forum Regular
Usergroup: Customer
Joined: Jun 02, 2004
Total Topics: 32
Total Comments: 142
Today I noticed that many members (but not all of them) who haven't logged in since signing up have a lastvisit value of 0. Because of this, their lastvisit field is showing the 1969 date when I try to display it. Do you know what might be causing this field to not update properly, and how to change the field for all members with this field as 0 to the registration date so it'll display properly?
Adam
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
As far as I can see it's not set on registration, so I don't see how some of your members could have a non-0 value. Added a $this->lastvisit = time(); to the register() function of the class for the next version though.
Forum Regular
Usergroup: Customer
Joined: Jun 02, 2004
Total Topics: 32
Total Comments: 142
Where in 3.16 would I add that, since I'm not using the newer version?
Also, how do I go about changing all the current lastvisit of 0 to something else, like their registration date. Is there a way to do this via the WSN advanced functions page or via phpmyadmin?
Adam
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
UPDATE wsnlinks_members SET lastvisit = time WHERE lastvisit = 0
Forum Regular
Usergroup: Customer
Joined: Jun 02, 2004
Total Topics: 32
Total Comments: 142
What file and where in that file would that line go?
Forum Regular
Usergroup: Customer
Joined: Jan 11, 2006
Total Topics: 48
Total Comments: 166
thats for mySQL. copy/paste it into the query area and submit in phpadmin with your WSN Links database open.
Forum Regular
Usergroup: Customer
Joined: Jun 02, 2004
Total Topics: 32
Total Comments: 142
I know. I'm asking about what he said in his first post:
Where is the register() function and where does $this->lastvisit = time(); go in that function?
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
classes/member.php and it would go at the top.