"disable" the users email address when we disable the account so we don't
accidentaly email them. Don't really destroy the email address, just make it not work. git-svn-id: https://samskivert.googlecode.com/svn/trunk@1281 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: UserRepository.java,v 1.33 2003/10/07 02:13:27 ray Exp $
|
// $Id: UserRepository.java,v 1.34 2003/10/29 19:41:52 eric Exp $
|
||||||
//
|
//
|
||||||
// samskivert library - useful routines for java programs
|
// samskivert library - useful routines for java programs
|
||||||
// Copyright (C) 2001 Michael Bayne
|
// Copyright (C) 2001 Michael Bayne
|
||||||
@@ -394,7 +394,13 @@ public class UserRepository extends JORARepository
|
|||||||
* originally. If we have to lop off any of the name to get our
|
* originally. If we have to lop off any of the name to get our
|
||||||
* prefix to fit we use a minus sign instead of a equals side. The
|
* prefix to fit we use a minus sign instead of a equals side. The
|
||||||
* password field is set to be the empty string so that no one can log
|
* password field is set to be the empty string so that no one can log
|
||||||
* in (since nothing hashes to the empty string.
|
* in (since nothing hashes to the empty string. We also make sure
|
||||||
|
* their email address no longer works, so in case we don't ignore
|
||||||
|
* 'deleted' users when we do the sql to get emailaddresses for the mass
|
||||||
|
* mailings we still won't spam delete folk. We leave the emailaddress
|
||||||
|
* intact exect for the @ sign which gets turned to a #, so that we can
|
||||||
|
* see what their email was incase it was an accidently deletion and we
|
||||||
|
* have to verify through email.
|
||||||
*/
|
*/
|
||||||
public void deleteUser (final User user)
|
public void deleteUser (final User user)
|
||||||
throws PersistenceException
|
throws PersistenceException
|
||||||
@@ -407,6 +413,7 @@ public class UserRepository extends JORARepository
|
|||||||
FieldMask mask = _utable.getFieldMask();
|
FieldMask mask = _utable.getFieldMask();
|
||||||
mask.setModified("username");
|
mask.setModified("username");
|
||||||
mask.setModified("password");
|
mask.setModified("password");
|
||||||
|
mask.setModified("email");
|
||||||
|
|
||||||
// set the password to unusable
|
// set the password to unusable
|
||||||
user.password = "";
|
user.password = "";
|
||||||
@@ -418,6 +425,10 @@ public class UserRepository extends JORARepository
|
|||||||
join = "-";
|
join = "-";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 'disable' their email address
|
||||||
|
String newEmail = user.email.replace('@','#');
|
||||||
|
user.email = newEmail;
|
||||||
|
|
||||||
for (int ii = 0; ii < 100; ii++) {
|
for (int ii = 0; ii < 100; ii++) {
|
||||||
try {
|
try {
|
||||||
user.username = ii + join + newName;
|
user.username = ii + join + newName;
|
||||||
|
|||||||
Reference in New Issue
Block a user