dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #33604
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 17179: Invite, including email in username. Makes it easier to find later.
------------------------------------------------------------
revno: 17179
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2014-10-20 17:26:12 +0200
message:
Invite, including email in username. Makes it easier to find later.
modified:
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/security/DefaultSecurityService.java
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/security/DefaultSecurityService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/security/DefaultSecurityService.java 2014-10-17 11:13:03 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/security/DefaultSecurityService.java 2014-10-20 15:26:12 +0000
@@ -69,7 +69,6 @@
private static final String RESTORE_PATH = "/dhis-web-commons/security/";
- private static final int INVITED_USERNAME_UNIQUE_LENGTH = 15;
private static final int INVITED_USER_PASSWORD_LENGTH = 40;
private static final int RESTORE_TOKEN_LENGTH = 50;
@@ -134,7 +133,7 @@
if ( user.getUsername() == null || user.getUsername().isEmpty() )
{
- String username = "user_invitation_" + CodeGenerator.generateCode( INVITED_USERNAME_UNIQUE_LENGTH );
+ String username = "invite-" + user.getEmail() + "-" + CodeGenerator.generateCode();
user.getUserCredentials().setUsername( username );
}