Commit a79ee4f0 authored by Leigh B. Stoller's avatar Leigh B. Stoller

Make sure usr_modified field initialized when users are first created.

parent 182e950b
...@@ -74,7 +74,7 @@ if (<> !~ /Y/i) { ...@@ -74,7 +74,7 @@ if (<> !~ /Y/i) {
print "Creating user in database...\n"; print "Creating user in database...\n";
DBQueryFatal("insert into users set uid='$username', usr_created=now(), " . DBQueryFatal("insert into users set uid='$username', usr_created=now(), " .
"usr_name='$userfull', usr_pswd='$password', unix_uid=$uid, ". "usr_name='$userfull', usr_pswd='$password', unix_uid=$uid, ".
"admin=1, dbedit=1, status='active'"); "usr_modified=now(), admin=1, dbedit=1, status='active'");
print "Creating project in database...\n"; print "Creating project in database...\n";
DBQueryFatal("insert into projects set pid='$project', created=now(), " . DBQueryFatal("insert into projects set pid='$project', created=now(), " .
......
...@@ -543,12 +543,12 @@ if (! $returning) { ...@@ -543,12 +543,12 @@ if (! $returning) {
DBQueryFatal("INSERT INTO users ". DBQueryFatal("INSERT INTO users ".
"(uid,usr_created,usr_expires,usr_name,usr_email,usr_addr,". "(uid,usr_created,usr_expires,usr_name,usr_email,usr_addr,".
" usr_URL,usr_phone,usr_title,usr_affil,usr_pswd,unix_uid,". " usr_URL,usr_phone,usr_title,usr_affil,usr_pswd,unix_uid,".
" status,pswd_expires) ". " status,pswd_expires,usr_modified) ".
"VALUES ('$joining_uid', now(), '$usr_expires', '$usr_name', ". "VALUES ('$joining_uid', now(), '$usr_expires', '$usr_name', ".
"'$usr_email', ". "'$usr_email', ".
"'$usr_addr', '$usr_URL', '$usr_phone', '$usr_title', '$usr_affil', ". "'$usr_addr', '$usr_URL', '$usr_phone', '$usr_title', '$usr_affil', ".
"'$encoding', NULL, 'newuser', ". "'$encoding', NULL, 'newuser', ".
"date_add(now(), interval 1 year))"); "date_add(now(), interval 1 year), now())");
if (isset($usr_key)) { if (isset($usr_key)) {
while (list ($idx, $stuff) = each ($usr_key)) { while (list ($idx, $stuff) = each ($usr_key)) {
......
...@@ -765,11 +765,11 @@ if (! $returning) { ...@@ -765,11 +765,11 @@ if (! $returning) {
DBQueryFatal("INSERT INTO users ". DBQueryFatal("INSERT INTO users ".
"(uid,usr_created,usr_expires,usr_name,usr_email,usr_addr,". "(uid,usr_created,usr_expires,usr_name,usr_email,usr_addr,".
" usr_URL,usr_title,usr_affil,usr_phone,usr_pswd,unix_uid,". " usr_URL,usr_title,usr_affil,usr_phone,usr_pswd,unix_uid,".
" status,pswd_expires) ". " status,pswd_expires,usr_modified) ".
"VALUES ('$proj_head_uid', now(), '$proj_expires', '$usr_name', ". "VALUES ('$proj_head_uid', now(), '$proj_expires', '$usr_name', ".
"'$usr_email', '$usr_addr', '$usr_URL', '$usr_title', '$usr_affil', ". "'$usr_email', '$usr_addr', '$usr_URL', '$usr_title', '$usr_affil', ".
"'$usr_phone', '$encoding', NULL, 'newuser', ". "'$usr_phone', '$encoding', NULL, 'newuser', ".
"date_add(now(), interval 1 year))"); "date_add(now(), interval 1 year), now())");
if (isset($usr_key)) { if (isset($usr_key)) {
while (list ($idx, $stuff) = each ($usr_key)) { while (list ($idx, $stuff) = each ($usr_key)) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment