Adding DB settings for the new "Allow Users To Change Email with no password" feature see BT#3312

skala
Julio Montoya 13 years ago
parent 9d74c7792d
commit f1d279413c
  1. 4
      main/auth/profile.php
  2. 7
      main/install/db_main.sql
  3. 8
      main/install/migrate-db-1.8.8-1.9.0-pre.sql

@ -586,8 +586,8 @@ if ($form->validate()) {
$_SESSION['is_not_password'] = 'success';
}
//$allow_users_to_change_email_with_no_password = api_get_setting('allow_users_to_change_email_with_no_password') == 'true' ? true :false;
$allow_users_to_change_email_with_no_password = true;
$allow_users_to_change_email_with_no_password = api_get_setting('allow_users_to_change_email_with_no_password') == 'true' ? true :false;
//$allow_users_to_change_email_with_no_password = true;
$changeemail = '';

@ -854,7 +854,8 @@ VALUES
('enable_help_link', NULL, 'radio', 'Platform', 'true', 'EnableHelpLinkTitle', 'EnableHelpLinkTitle', NULL, NULL, 0),
('allow_teacher_change_gradebook_grading_model', NULL, 'radio', 'Gradebook', 'false', 'AllowTeacherChangeGradebookGradingModelTitle', 'AllowTeacherChangeGradebookGradingModelComment', NULL, NULL, 1),
('grading_model', 'grading_model', 'custom', 'Gradebook', 'false', 'GradingModelTitle', 'GradingModelComment', NULL, NULL, 1),
('chamilo_database_version',NULL,'textfield',NULL, '1.9.0.16241','DokeosDatabaseVersion','', NULL, NULL, 0);
('allow_users_to_change_email_with_no_password', NULL, 'radio', 'User', 'false', 'AllowUsersToChangeEmailWithNoPasswordTitle', 'AllowUsersToChangeEmailWithNoPasswordComment', NULL, NULL, 0),
('chamilo_database_version',NULL,'textfield',NULL, '1.9.0.16305','DokeosDatabaseVersion','', NULL, NULL, 0);
/*
('use_custom_pages',NULL,'radio','Platform','false','UseCustomPages','useCustomPagesComment','platform',NULL,0),
@ -1160,7 +1161,9 @@ VALUES
('grading_model', '1*X+1*X', 'Model 1'),
('grading_model', '1*X+1*X+1*X', 'Model 2'),
('grading_model', '1*X+1*X+1*X+1*X/4', 'Model 3'),
('grading_model', '1*X+2*X+1*X+2*X/6', 'Model 4');
('grading_model', '1*X+2*X+1*X+2*X/6', 'Model 4'),
('allow_users_to_change_email_with_no_password', 'true', 'Yes'),
('allow_users_to_change_email_with_no_password', 'false', 'No');
/*
('use_custom_pages','true','Yes'),

@ -104,6 +104,12 @@ INSERT INTO settings_options (variable, value, display_text) VALUES ('grading_mo
INSERT INTO settings_options (variable, value, display_text) VALUES ('grading_model', '1*X+2*X+1*X+2*X/6', 'Model 4');
INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES ('allow_users_to_change_email_with_no_password', NULL, 'radio', 'User', 'false', 'AllowUsersToChangeEmailWithNoPasswordTitle', 'AllowUsersToChangeEmailWithNoPasswordComment', NULL, NULL, 0);
INSERT INTO settings_options (variable, value, display_text) VALUES ('allow_users_to_change_email_with_no_password', 'true', 'Yes');
INSERT INTO settings_options (variable, value, display_text) VALUES ('allow_users_to_change_email_with_no_password', 'false', 'No');
ALTER TABLE course_rel_user ADD COLUMN legal_agreement INTEGER DEFAULT 0;
ALTER TABLE session_rel_course_rel_user ADD COLUMN legal_agreement INTEGER DEFAULT 0;
ALTER TABLE course ADD COLUMN legal TEXT NOT NULL;
@ -118,7 +124,7 @@ ALTER TABLE gradebook_category MODIFY COLUMN weight FLOAT NOT NULL;
ALTER TABLE gradebook_link MODIFY COLUMN weight FLOAT NOT NULL;
-- Do not move this query
UPDATE settings_current SET selected_value = '1.9.0.16241' WHERE variable = 'chamilo_database_version';
UPDATE settings_current SET selected_value = '1.9.0.16305' WHERE variable = 'chamilo_database_version';

Loading…
Cancel
Save