diff options
author | plegall <plg@piwigo.org> | 2006-04-27 21:05:07 +0000 |
---|---|---|
committer | plegall <plg@piwigo.org> | 2006-04-27 21:05:07 +0000 |
commit | 46900fece3a0ffb09a0a4fe58bae841a3978f79d (patch) | |
tree | 7922f66a8f62a2eacf810ac75ed90344094f26fb /include/functions_user.inc.php | |
parent | 321d7d474c0c88316472e96d9740b2c4bbb6f6a6 (diff) |
bug 228 fixed one more time ;-): use boolean_to_string on
$conf['newuser_default_enabled_high'] during user infos creation. Useless
use of boolean_to_string on $conf['newcat_default_status'] was removed.
modification: loading configuration parameter from database was moved to a
dedicated function to be called from include/common.inc.php and from
install.php.
improvement: use of clean insert function during install.
bug fixed: during user information creation, support new status
webmaster/normal/guest instead of admin/guest.
bug fixed: during install, no need to insert obsolete mail_webmaster
configuration parameter.
git-svn-id: http://piwigo.org/svn/branches/branch-1_6@1282 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include/functions_user.inc.php')
-rw-r--r-- | include/functions_user.inc.php | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/include/functions_user.inc.php b/include/functions_user.inc.php index 0965467ce..90fda9e55 100644 --- a/include/functions_user.inc.php +++ b/include/functions_user.inc.php @@ -446,10 +446,23 @@ function create_user_infos($user_id) list($dbnow) = mysql_fetch_row(pwg_query('SELECT NOW();')); + if ($user_id == $conf['webmaster_id']) + { + $status = 'webmaster'; + } + else if ($user_id == $conf['guest_id']) + { + $status = 'guest'; + } + else + { + $status = 'normal'; + } + $insert = array( 'user_id' => $user_id, - 'status' => $user_id == $conf['webmaster_id'] ? 'admin' : 'normal', + 'status' => $status, 'template' => $conf['default_template'], 'nb_image_line' => $conf['nb_image_line'], 'nb_line_page' => $conf['nb_line_page'], @@ -460,7 +473,8 @@ function create_user_infos($user_id) 'maxwidth' => $conf['default_maxwidth'], 'maxheight' => $conf['default_maxheight'], 'registration_date' => $dbnow, - 'enabled_high' => $conf['newuser_default_enabled_high'] + 'enabled_high' => + boolean_to_string($conf['newuser_default_enabled_high']), ); include_once(PHPWG_ROOT_PATH.'admin/include/functions.php'); |