Gossamer Forum
Quote Reply
Registered on global?
I don’t know if this has been done before, but what about a Registered date global/plugin?

So for loged in users you could have something like:

Registered on: 1-July-2002.

- this would be the date the user was registered on the system.

Privacy Software

Last edited by:

BLOOD: Jan 28, 2003, 10:22 AM
Quote Reply
Re: [BLOOD] Registered on global? In reply to
There is simply no such information stored in the user table.
That would need more than just a global.

However the good news is, that the upcoming Community plugin will support the Registered date.

Best regards,

Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...
Quote Reply
Re: [webmaster33] Registered on global? In reply to
This should be easy.

1. simply add a date_registered column in the users table

2. then add inside login.cgi under sub signup_user {

# Set date variable to today's date.


my $today = GT::Date::date_get();

$user->{date_registered} =$today;

Hope this helps!

With this info, then you can create the global to pull the user date info!

Quote Reply
Re: [xpert] Registered on global? In reply to
Remember that won't be good for upgrades. Better with a plugin.
Quote Reply
Re: [BLOOD] Registered on global? In reply to
I've done this for years with Links SQL. I also keep track of the site they logged in on.

It's actually really easy to do. Checking the the mysql.com manual (which is a wonderful reference).....


The TIMESTAMP column type provides a type that you can use to automatically mark INSERT or UPDATE operations with the current date and time. If you have multiple TIMESTAMP columns, only the first one is updated automatically.

Automatic updating of the first TIMESTAMP column occurs under any of the following conditions:
  • The column is not specified explicitly in an INSERT or LOAD DATA INFILE statement.
  • The column is not specified explicitly in an UPDATE statement and some other column changes value. (Note that an UPDATE that sets a column to the value it already has will not cause the TIMESTAMP column to be updated, because if you set a column to its current value, MySQL ignores the update for efficiency.)
  • You explicitly set the TIMESTAMP column to NULL.

TIMESTAMP columns other than the first may also be set to the current date and time. Just set the column to NULL or to NOW().

You can set any TIMESTAMP column to a value different from the current date and time by setting it explicitly to the desired value. This is true even for the first TIMESTAMP column. You can use this property if, for example, you want a TIMESTAMP to be set to the current date and time when you create a row, but not to be changed whenever the row is updated later:
  • Let MySQL set the column when the row is created. This will initialise it to the current date and time.
  • When you perform subsequent updates to other columns in the row, set the TIMESTAMP column explicitly to its current value.

On the other hand, you may find it just as easy to use a DATETIME column that you initialise to NOW() when the row is created and leave alone for subsequent updates.

Note.... that very last paragraph.

PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.