]> git.mxchange.org Git - friendica.git/commitdiff
register/login timestamps
authorFriendika <info@friendika.com>
Fri, 17 Dec 2010 00:35:45 +0000 (16:35 -0800)
committerFriendika <info@friendika.com>
Fri, 17 Dec 2010 00:35:45 +0000 (16:35 -0800)
boot.php
database.sql
include/auth.php
include/nav.php
include/profile_selectors.php
mod/openid.php
mod/register.php
update.php
util/strings.php

index 1546429c3505e0be30cebb0eae7f6912d38496d9..1870e059e9eb36cf3ba9f7ff8b7d245cc143f9c1 100644 (file)
--- a/boot.php
+++ b/boot.php
@@ -2,7 +2,7 @@
 
 set_time_limit(0);
 
-define ( 'BUILD_ID',               1023   );
+define ( 'BUILD_ID',               1024   );
 define ( 'DFRN_PROTOCOL_VERSION',  '2.0'  );
 
 define ( 'EOL',                    "<br />\r\n"     );
index 148a8d0d8588acfe0855f865b3277dde5e6594f6..dab7c179d9922416e39d83aa195b26d93fd4d500 100644 (file)
@@ -357,6 +357,8 @@ CREATE TABLE IF NOT EXISTS `user` (
   `email` char(255) NOT NULL,
   `openid` char(255) NOT NULL,
   `timezone` char(128) NOT NULL,
+  `register_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+  `login_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
   `default-location` char(255) NOT NULL,
   `allow_location` tinyint(1) NOT NULL DEFAULT '0',
   `theme` char(255) NOT NULL,
index dd4afac2392200c904dcfe345b94b3a1349e93ae..fe09ef1604c5b7e2096db828345807ddaba844da 100644 (file)
@@ -162,6 +162,10 @@ else {
                        $a->cid = $r[0]['id'];
                        $_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']))
index f7c5c4e01d2e3a0a47c042c5e29c655e1251ba3f..171309673404094a6fc8656cd72c4412bf0326de 100644 (file)
@@ -1,5 +1,8 @@
 <?php
 
+       if(!(x($a->page,'nav')))
+               $a->page['nav'] = '';
+
        $a->page['nav'] .= '<div id="panel" style="display: none;"></div>' ;
 
        if(local_user()) {
index 63bc22dc590d49cc8759651628ea258cc66682b7..f4b30f211877f1dbc55a6735024980aab783f58f 100644 (file)
@@ -3,7 +3,7 @@
 
 function gender_selector($current="",$suffix="") {
        $o = '';
-       $select = array('', t('Male'), t('Female'), t('Mostly Male'), t('Mostly Female'), t('Transgender'), t('Intersex'), t('Transsexual'), t('Hermaphrodite'), t('Currently Male'), t('Currently Female'), t('Neuter'), t('Non-specific'), t('Other'), t('Undecided'));
+       $select = array('', t('Male'), t('Female'), t('Currently Male'), t('Currently Female'), t('Mostly Male'), t('Mostly Female'), t('Transgender'), t('Intersex'), t('Transsexual'), t('Hermaphrodite'), t('Neuter'), t('Non-specific'), t('Other'), t('Undecided'));
 
        $o .= "<select name=\"gender$suffix\" id=\"gender-select$suffix\" size=\"1\" >";
        foreach($select as $selection) {
index 84d4bf4bf0b783e6f4f8769559ccb2e41a455fbd..91efbbbc421313e405e6eb2f3acdecf665f2e111 100644 (file)
@@ -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']);
index 7ad7ef211861d980862aa581cadf67713630c858..d9dae49a22bb0484ce95cc4aba78c0f8f4b5a7cb 100644 (file)
@@ -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)
                );
index b3fab6720bd658789b6a0312c4f4080ec7a414c7..c5aa5619463521efb55028ccd137b2c49be257d9 100644 (file)
@@ -237,3 +237,9 @@ function update_1022() {
                `v` MEDIUMTEXT NOT NULL
                ) ENGINE = MYISAM CHARACTER SET utf8 COLLATE utf8_general_ci ");
 }
+
+function update_1023() {
+       q("ALTER TABLE `user` ADD `register_date` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00' AFTER `timezone` ,
+       ADD `login_date` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00' AFTER `register_date` ");
+}
+
index 43139b0a02d52148048dddb74eccd79a9257f7b0..62211918e8b5e24a750ab29723ed00c3d6f5bbc5 100644 (file)
@@ -28,6 +28,13 @@ $a->strings['No contacts'] = 'No contacts';
 $a->strings['Contacts'] = 'Contacts';
 $a->strings['View Contacts'] = 'View Contacts';
 $a->strings['Search'] = 'Search';
+$a->strings['No profile'] = 'No profile';
+$a->strings['Connect'] = 'Connect';
+$a->strings['Location:'] = 'Location:';
+$a->strings[', '] = ', ';
+$a->strings['Gender:'] = 'Gender:';
+$a->strings['Status:'] = 'Status:';
+$a->strings['Homepage:'] = 'Homepage:';
 $a->strings["Invite Friends"] = "Invite Friends";
 $a->strings['Connect/Follow [profile address]'] = 'Connect/Follow [profile address]';
 $a->strings['Example: bob@example.com, http://example.com/barbara'] = 'Example: bob@example.com, http://example.com/barbara';
@@ -86,6 +93,7 @@ $a->strings['Unable to update your contact profile details on our system'] = 'Un
 $a->strings["Connection accepted at "] = "Connection accepted at ";
 $a->strings['Administrator'] = 'Administrator';
 $a->strings['New mail received at '] = 'New mail received at ';
+$a->strings[' commented on an item at '] = ' commented on an item at ';
 $a->strings[" commented on an item at "] = " commented on an item at ";
 $a->strings[' welcomes '] = ' welcomes ';
 $a->strings["This introduction has already been accepted."] = "This introduction has already been accepted.";
@@ -163,7 +171,7 @@ $a->strings['Your message:'] = 'Your message:';
 $a->strings['Please join my social network on '] = 'Please join my social network on ';
 $a->strings["\r\n"] = "\r\n";
 $a->strings['To accept this invitation, please visit:'] = 'To accept this invitation, please visit:';
-$a->strings['Once you have registered, please make an introduction via my profile page at:'] = 'Once you have registered, please make an introduction via my profile page at:';
+$a->strings['Once you have registered, please connect with me via my profile page at:'] = 'Once you have registered, please connect with me via my profile page at:';
 $a->strings['Unable to locate original post.'] = 'Unable to locate original post.';
 $a->strings['Empty post discarded.'] = 'Empty post discarded.';
 $a->strings[" commented on your item at "] = " commented on your item at ";
@@ -173,6 +181,7 @@ $a->strings['status'] = 'status';
 $a->strings['likes'] = 'likes';
 $a->strings['doesn\'t like'] = 'doesn\'t like';
 $a->strings['\'s'] = '\'s';
+$a->strings['Remote privacy information not available.'] = 'Remote privacy information not available.';
 $a->strings['Visible to:'] = 'Visible to:';
 $a->strings['Password reset requested at '] = 'Password reset requested at ';
 $a->strings['No recipient selected.'] = 'No recipient selected.';
@@ -246,7 +255,6 @@ $a->strings['Example: @bob, @Barbara_Jensen, @jim@example.com, #California, #cam
 $a->strings['Recent Photos'] = 'Recent Photos';
 $a->strings['Upload New Photos'] = 'Upload New Photos';
 $a->strings['View Album'] = 'View Album';
-$a->strings['No profile'] = 'No profile';
 $a->strings['Image uploaded but image cropping failed.'] = 'Image uploaded but image cropping failed.';
 $a->strings['Image size reduction [175] failed.'] = 'Image size reduction [175] failed.';
 $a->strings['Image size reduction [80] failed.'] = 'Image size reduction [80] failed.';
@@ -265,7 +273,7 @@ $a->strings['Age: '] = 'Age: ';
 $a->strings['Please enter the required information.'] = 'Please enter the required information.';
 $a->strings['Please use a shorter name.'] = 'Please use a shorter name.';
 $a->strings['Name too short.'] = 'Name too short.';
-$a->strings['That doesn\'t appear to be your full name.'] = 'That doesn\'t appear to be your full name.';
+$a->strings["That doesn\'t appear to be your full \x28First Last\x29 name."] = "That doesn\'t appear to be your full \x28First Last\x29 name.";
 $a->strings['Your email domain is not among those allowed on this site.'] = 'Your email domain is not among those allowed on this site.';
 $a->strings['Your "nickname" can only contain "a-z", "0-9", "-", and "_", and must also begin with a letter.'] = 'Your "nickname" can only contain "a-z", "0-9", "-", and "_", and must also begin with a letter.';
 $a->strings['Nickname is already registered. Please choose another.'] = 'Nickname is already registered. Please choose another.';
@@ -354,14 +362,14 @@ $a->strings['Settings'] = 'Settings';
 $a->strings['Profiles'] = 'Profiles';
 $a->strings['Male'] = 'Male';
 $a->strings['Female'] = 'Female';
+$a->strings['Currently Male'] = 'Currently Male';
+$a->strings['Currently Female'] = 'Currently Female';
 $a->strings['Mostly Male'] = 'Mostly Male';
 $a->strings['Mostly Female'] = 'Mostly Female';
 $a->strings['Transgender'] = 'Transgender';
 $a->strings['Intersex'] = 'Intersex';
 $a->strings['Transsexual'] = 'Transsexual';
 $a->strings['Hermaphrodite'] = 'Hermaphrodite';
-$a->strings['Currently Male'] = 'Currently Male';
-$a->strings['Currently Female'] = 'Currently Female';
 $a->strings['Neuter'] = 'Neuter';
 $a->strings['Non-specific'] = 'Non-specific';
 $a->strings['Other'] = 'Other';