From: friendica Date: Sat, 31 Mar 2012 23:08:40 +0000 (-0700) Subject: ensure all new users get a timezone. We'll use UTC until they choose otherwise. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=2147e0a71fab98fd6e11b1ca54e46821c8829213;p=friendica.git ensure all new users get a timezone. We'll use UTC until they choose otherwise. --- diff --git a/boot.php b/boot.php index 6309a5f9b0..bdd8d4f962 100755 --- a/boot.php +++ b/boot.php @@ -1313,8 +1313,12 @@ function feed_birthday($uid,$tz) { * */ + $birthday = ''; + if(! strlen($tz)) + $tz = 'UTC'; + $p = q("SELECT `dob` FROM `profile` WHERE `is-default` = 1 AND `uid` = %d LIMIT 1", intval($uid) ); diff --git a/mod/register.php b/mod/register.php index 91080b1d8e..630c0a6759 100755 --- a/mod/register.php +++ b/mod/register.php @@ -220,8 +220,8 @@ function register_post(&$a) { $spubkey = $spkey["key"]; $r = q("INSERT INTO `user` ( `guid`, `username`, `password`, `email`, `openid`, `nickname`, - `pubkey`, `prvkey`, `spubkey`, `sprvkey`, `register_date`, `verified`, `blocked` ) - VALUES ( '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d )", + `pubkey`, `prvkey`, `spubkey`, `sprvkey`, `register_date`, `verified`, `blocked`, `timezone` ) + VALUES ( '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d, 'UTC' )", dbesc(generate_user_guid()), dbesc($username), dbesc($new_password_encoded),