Compare commits
	
		
			2 Commits
		
	
	
		
			a3c3ee0fe0
			...
			27710e92af
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 27710e92af | |||
| ec2d3b581d | 
@@ -106,9 +106,15 @@ public class AccountMgr {
 | 
			
		||||
        String[] pwH = {"email"};
 | 
			
		||||
        String[] pwD = {email};
 | 
			
		||||
        List<String> foundEmail = Database.select("user",pwH,pwD);
 | 
			
		||||
        String[] userParts = foundEmail.get(0).split(":");
 | 
			
		||||
        String[] pwParts = userParts[4].split("\\.");
 | 
			
		||||
        String salt = pwParts[1];
 | 
			
		||||
        String salt;
 | 
			
		||||
        if(foundEmail.size() == 1){
 | 
			
		||||
            String[] userParts = foundEmail.get(0).split(":");
 | 
			
		||||
            String[] pwParts = userParts[4].split("\\.");
 | 
			
		||||
            salt = pwParts[1];
 | 
			
		||||
        }else{
 | 
			
		||||
            //no unique user found; still calculating a hash for security reasons
 | 
			
		||||
            salt = getSalt();
 | 
			
		||||
        }
 | 
			
		||||
        String[] userH = {"email","password"};
 | 
			
		||||
        String[] userD = {email,hashAndSalt(pw,salt)};
 | 
			
		||||
        return Database.getSingleId("user",userH,userD);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user