Project

General

Profile

« Previous | Next » 

Revision 613

Added by doc almost 17 years ago

added default language for users to avoid empty language fields

View differences:

add.php
41 41
$display_name = $admin->get_post('display_name');
42 42
$email = $admin->get_post('email');
43 43
$home_folder = $admin->get_post('home_folder');
44
$default_language = DEFAULT_LANGUAGE;
44 45

  
45 46
// Create a javascript back link
46 47
$js_back = "javascript: history.go(-1);";
......
84 85
$md5_password = md5($password);
85 86

  
86 87
// Inser the user into the database
87
$query = "INSERT INTO ".TABLE_PREFIX."users (groups_id,active,username,password,display_name,home_folder,email,timezone) VALUES ('$groups_id', '$active', '$username','$md5_password','$display_name','$home_folder','$email','-72000')";
88
$query = "INSERT INTO ".TABLE_PREFIX."users (groups_id,active,username,password,display_name,home_folder,email,timezone, language) VALUES ('$groups_id', '$active', '$username','$md5_password','$display_name','$home_folder','$email','-72000', '$default_language')";
88 89
$database->query($query);
89 90
if($database->is_error()) {
90 91
	$admin->print_error($database->get_error());

Also available in: Unified diff