diff options
author | Friendika <info@friendika.com> | 2010-12-16 16:35:45 -0800 |
---|---|---|
committer | Friendika <info@friendika.com> | 2010-12-16 16:35:45 -0800 |
commit | f60f82727f96c033aaff9f5b5f0767c722e25f28 (patch) | |
tree | 9ad52de5515064ac7b8ad12b7c07a408803b4784 /mod | |
parent | df2e79dcaf28810e31d4bdc48bdb76e12f70e817 (diff) | |
download | volse-hubzilla-f60f82727f96c033aaff9f5b5f0767c722e25f28.tar.gz volse-hubzilla-f60f82727f96c033aaff9f5b5f0767c722e25f28.tar.bz2 volse-hubzilla-f60f82727f96c033aaff9f5b5f0767c722e25f28.zip |
register/login timestamps
Diffstat (limited to 'mod')
-rw-r--r-- | mod/openid.php | 5 | ||||
-rw-r--r-- | mod/register.php | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/mod/openid.php b/mod/openid.php index 84d4bf4bf..91efbbbc4 100644 --- a/mod/openid.php +++ b/mod/openid.php @@ -83,6 +83,11 @@ function openid_content(&$a) { $_SESSION['cid'] = $a->cid; } + q("UPDATE `user` SET `login_date` = '%s' WHERE `uid` = %d LIMIT 1", + dbesc(datetime_convert()), + intval($_SESSION['uid']) + ); + header('X-Account-Management-Status: active; name="' . $a->user['username'] . '"; id="' . $a->user['nickname'] .'"'); if(($a->module !== 'home') && isset($_SESSION['return_url'])) goaway($a->get_baseurl() . '/' . $_SESSION['return_url']); diff --git a/mod/register.php b/mod/register.php index 7ad7ef211..d9dae49a2 100644 --- a/mod/register.php +++ b/mod/register.php @@ -138,8 +138,8 @@ function register_post(&$a) { $spubkey = $spkey["key"]; $r = q("INSERT INTO `user` ( `username`, `password`, `email`, `openid`, `nickname`, - `pubkey`, `prvkey`, `spubkey`, `sprvkey`, `verified`, `blocked` ) - VALUES ( '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d )", + `pubkey`, `prvkey`, `spubkey`, `sprvkey`, `register_date`, `verified`, `blocked` ) + VALUES ( '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d )", dbesc($username), dbesc($new_password_encoded), dbesc($email), @@ -149,6 +149,7 @@ function register_post(&$a) { dbesc($prvkey), dbesc($spubkey), dbesc($sprvkey), + dbesc(datetime_convert()), intval($verified), intval($blocked) ); |