Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Email change notification #2500

Merged
merged 42 commits into from
May 15, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
2b16e60
Include previous_email_addr and email_addr_change_time to database sc…
Uplinger Apr 13, 2018
23a9b2b
Update to have a changed email sent to members after they change thei…
Apr 16, 2018
8956751
Updated to send the email out properly.
Uplinger Apr 17, 2018
cc38a9d
Update to actually print the word at in email message.
Uplinger Apr 19, 2018
863cf3d
Added text to the website that will show if an email was changed with…
Uplinger Apr 19, 2018
a2a78a6
Merge branch 'master' into email_change_notification
Uplinger Apr 19, 2018
db4e020
Update to have db_update.php to add previous_email_addr and email_add…
Uplinger Apr 19, 2018
36a8b1f
Changed to use php time passed to the database instead of using the d…
Uplinger Apr 19, 2018
a1b03c8
Merge remote-tracking branch 'upstream/knr_token2' into email_change_…
Apr 23, 2018
dbafb59
Change to use token.inc for email_change_notification
Apr 23, 2018
c516ed3
Fixed error in string as well as force email.inc to include token.inc.
Uplinger Apr 23, 2018
fa4603f
Updated user pages to include a reset_email_addr.php that is called f…
Uplinger Apr 24, 2018
6602dcf
Renamed to recover_email.php from reset_email_addr.php
Uplinger Apr 24, 2018
50a8756
Changed to fix datbase update error on recover_email.php.
Uplinger Apr 24, 2018
79b169c
Fixed email changes so that database_hash is used instead of simple e…
Uplinger Apr 24, 2018
09c54fb
Merge remote-tracking branch 'upstream/master' into email_change_noti…
Apr 25, 2018
389ede3
Updated to have function to look up previous email addresses that are…
May 1, 2018
c226ee7
Account manager set info and create user has a check to make sure tha…
May 1, 2018
4785a05
Fixing missing ending call in function.
Uplinger May 1, 2018
69f78a6
Fix bug where I was sending it a null string to lookup_prev_email_addr
Uplinger May 1, 2018
3011ccf
Fixed a typo in recover_email.php as well as not require the user to …
Uplinger May 1, 2018
aaf866e
Delete token for email recovery.
Uplinger May 2, 2018
7916631
Fix setting previous email address in AccountManager set info.
Uplinger May 2, 2018
93d6e0b
Clean up boinc_db email calls.
Uplinger May 2, 2018
7c9b4ad
Fixed bug where new email address and change time was not being passe…
Uplinger May 2, 2018
4aa5acb
Changed email.inc so that it will look for older version of PHPMailer…
Uplinger May 2, 2018
d0fcd1e
Various tweaks to Keith's changes.
davidpanderson May 7, 2018
e874a86
Removed call to BoincDb::get() as it called within escape_string func…
May 8, 2018
2905e50
Cleaned up text within email recovery pages.
May 8, 2018
cbcbb5e
Merge remote-tracking branch 'upstream/keith_email' into email_change…
May 8, 2018
6964382
Updated comments in a few places for email address changes.
May 8, 2018
7749c64
Added database call for previous email address in c++ code.
May 8, 2018
94a6687
am_set_info, if email address is the same as the user, then do nothin…
May 8, 2018
5cead5f
Added check in am_set_info to return an error if the email address wa…
May 8, 2018
387d596
Fixed problem with bad constant called for invalid email address in a…
May 8, 2018
8c9626f
Changed setting previous_email_addr to blank instead of null since th…
May 8, 2018
e82a698
Fixed Scrutinizer issue where variables were declared blank but decla…
May 8, 2018
9cd7d63
Change error code for duplicate email addresses found in am_set_info.php
May 8, 2018
0d78176
Change phrasing in the edit_email_form.php
May 8, 2018
4168861
Added comments for recover_email.php
May 8, 2018
fecbfa3
Modified the table definition for user table to have email_addr_chang…
Uplinger May 10, 2018
12a3933
Updated boinc_db.cpp to print email address change columns.
May 15, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion db/constraints.sql
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ alter table user
add index user_name(name),
add index user_tot (total_credit desc),
-- db_dump.C
add index user_avg (expavg_credit desc);
add index user_avg (expavg_credit desc),
-- db_dump.C
add index user_email_time (email_addr_change_time);

alter table team
add unique(name),
Expand Down
2 changes: 1 addition & 1 deletion html/inc/boinc_db.inc
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ class BoincUser {
static function lookup_prev_email_addr($email_addr) {
$email_addr = strtolower(BoincDb::escape_string($email_addr));
$mytime = time() - 604800;
return self::lookup("previous_email_addr='$email_addr' and email_addr_change_time > $mytime");
return self::lookup("email_addr_change_time > $mytime and previous_email_addr='$email_addr'");
}
// name is not necessarily unique
//
Expand Down
1 change: 1 addition & 0 deletions html/ops/db_update.php
Original file line number Diff line number Diff line change
Expand Up @@ -1107,6 +1107,7 @@ function update_4_19_2018() {
add column previous_email_addr varchar(254) not null default '',
add column email_addr_change_time double not null default 0
");
do_query("alter table user add index user_email_time (email_addr_change_time)");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this needs a semi-colon at the end doesn't it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where are you thinking the semicolon goes, there is one after the do_query close bracket? From previous examples of do_query, a semicolon is not needed before the end quotes. Note, you should be able to see similar update query in function update_5_12_2004.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok - I was under the impression that mysql required a semi-colon at the end of statements, but if you've tested it and it works then clearly it is fine. I retract my question.

}

// Updates are done automatically if you use "upgrade".
Expand Down