This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "FusionForge".
The branch, master has been updated
via a449afbb54479775ccf5f63230dd8e4f64a626a9 (commit)
from ac3d4e3260233dedac0e2ed6d2358b0668548c99 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=a449afbb54479775ccf5f63230dd8e4f64a626a9
commit a449afbb54479775ccf5f63230dd8e4f64a626a9
Author: Franck Villaume <[email protected]>
Date: Fri Jun 17 13:39:01 2016 +0200
User creation: support timestamp to help on import
diff --git a/src/common/include/User.class.php
b/src/common/include/User.class.php
index 4539e2a..cc778d3 100644
--- a/src/common/include/User.class.php
+++ b/src/common/include/User.class.php
@@ -301,7 +301,7 @@ class FFUser extends FFError {
$mail_site, $mail_va, $language_id,
$timezone,
$dummy1, $dummy2, $theme_id, $unix_box
= 'shell',
$address = '', $address2 = '', $phone =
'', $fax = '', $title = '',
- $ccode = 'US', $send_mail = true,
$tooltips = true) {
+ $ccode = 'US', $send_mail = true,
$tooltips = true, $createtimestamp = null) {
global $SYS;
if (!$theme_id) {
$this->setError(_('You must supply a theme'));
@@ -407,6 +407,7 @@ class FFUser extends FFError {
// if we got this far, it must be good
$confirm_hash =
substr(md5($password1.util_randbytes().microtime()), 0, 16);
db_begin();
+ $createtimestamp = (($createtimestamp) ? $createtimestamp :
time());
$result = db_query_params('INSERT INTO users
(user_name,unix_pw,realname,firstname,lastname,email,add_date,status,confirm_hash,mail_siteupdates,mail_va,language,timezone,unix_box,address,address2,phone,fax,title,ccode,theme_id,tooltips,shell)
VALUES
($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23)',
array($unix_name,
@@ -415,7 +416,7 @@ class FFUser extends FFError {
htmlspecialchars($firstname),
htmlspecialchars($lastname),
$email,
- time(),
+ $createtimestamp,
'P',
$confirm_hash,
(($mail_site)? "1" : "0"),
@@ -455,6 +456,7 @@ class FFUser extends FFError {
$hook_params['user_id'] = $this->getID();
$hook_params['user_name'] = $unix_name;
$hook_params['user_password'] = $password1;
+ $hook_params['user_timecreate'] = $createtimestamp;
plugin_hook("user_create", $hook_params);
if ($send_mail) {
-----------------------------------------------------------------------
Summary of changes:
src/common/include/User.class.php | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
hooks/post-receive
--
FusionForge
_______________________________________________
Fusionforge-commits mailing list
[email protected]
http://lists.fusionforge.org/cgi-bin/mailman/listinfo/fusionforge-commits