Support Forums

Old 01-05-2009, 04:48 AM   #1
Genius At Work
 
bowers01's Avatar
 
Join Date: May 2008
Location: Geelong, Victoria, Australia
Posts: 692
Rep Power: 17
bowers01 is on a distinguished road
Default Determine if first login

Hi,
Is it possible to determine if its the first time a user has logged in? i want to display a popup if its the first time a user has logged into their account.
Cheers,
Nick
__________________
Nick Bowers
68c v4.09 Developer
bowers01 is offline   Reply With Quote
Old 01-05-2009, 08:12 AM   #2
Moderator
 
 
Join Date: Mar 2006
Posts: 4,114
Rep Power: 101
Lhotch is just really niceLhotch is just really nice
Default

do a query against the user database table and check the value of the "lastlogin" field before the actual login, if its set to the default value still then the user has never logged in.

But, keep in mind doing this means that everytime someone accesses your site you are going to have an additional database call which for most people is going to be worthless since it applies only to those who have never logged in before.
__________________
Larry.
(Please note: I am not a 68C employee. I am a customer and volunteer who helps with questions where I can and the forums spam free)

Set your site apart from the competition with one of my modules......
Google Map Module | You Tube Module | Google Calendar Module | Event Calendar Module

68 Classifieds Important Links
Customer Area | Issue Tracker | Knowledge Base | User Manuals
Lhotch is offline   Reply With Quote
Old 01-06-2009, 05:10 AM   #3
Genius At Work
 
bowers01's Avatar
 
Join Date: May 2008
Location: Geelong, Victoria, Australia
Posts: 692
Rep Power: 17
bowers01 is on a distinguished road
Default

Hi,
I found out that it is already being called from the database.
By placing this in userindex.tpl
Code:
{if $lastlogin=='0000-00-00 00:00:00'}
<script type="text/javascript">
 alert("Welcome to yoursite.com")
</script>
{/if}
it doesnt work as the database is updated with the current time because you just logged in before the message will appear.
How could i make it assign $lastlogin before the database is updated?

Cheers,
Nick
__________________
Nick Bowers
68c v4.09 Developer
bowers01 is offline   Reply With Quote
Old 01-07-2009, 09:05 PM   #4
Genius At Work
 
bowers01's Avatar
 
Join Date: May 2008
Location: Geelong, Victoria, Australia
Posts: 692
Rep Power: 17
bowers01 is on a distinguished road
Default

Anyone?


Cheers,
Nick
__________________
Nick Bowers
68c v4.09 Developer
bowers01 is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
determine if ie6 or below bowers01 v4 Modules / Modifications 3 11-19-2008 06:33 PM
Determine Broadband Users From Dial Up Users bowers01 v4 Questions & Support 3 09-08-2008 02:33 AM
Determine geographic location objelland v3.1 Questions & Support 3 01-26-2008 09:41 AM
Can't login Timeshareline v3.1 Questions & Support 1 02-04-2007 12:53 PM
Login Over and Over and Over garysmith v3.1 Questions & Support 6 05-16-2006 07:55 AM


All times are GMT -4. The time now is 06:48 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0