|  | @@ -328,7 +328,7 @@ class UserRestController(TIMRestController):
 | 
	
		
			
			| 328 | 328 |              user.password = password
 | 
	
		
			
			| 329 | 329 |          elif send_email:
 | 
	
		
			
			| 330 | 330 |              # Setup a random password to send email at user
 | 
	
		
			
			| 331 |  | -            password = UserRestController.generate_password()
 | 
	
		
			
			|  | 331 | +            password = self.generate_password()
 | 
	
		
			
			| 332 | 332 |              user.password = password
 | 
	
		
			
			| 333 | 333 |  
 | 
	
		
			
			| 334 | 334 |          user.webdav_left_digest_response_hash = '%s:/:%s' % (email, password)
 | 
	
	
		
			
			|  | @@ -353,18 +353,12 @@ class UserRestController(TIMRestController):
 | 
	
		
			
			| 353 | 353 |          tg.flash(_('User {} created.').format(user.get_display_name()), CST.STATUS_OK)
 | 
	
		
			
			| 354 | 354 |          tg.redirect(self.url())
 | 
	
		
			
			| 355 | 355 |  
 | 
	
		
			
			| 356 |  | -    @staticmethod
 | 
	
		
			
			| 357 |  | -    def generate_password():
 | 
	
		
			
			|  | 356 | +    @classmethod
 | 
	
		
			
			|  | 357 | +    def generate_password(cls):
 | 
	
		
			
			| 358 | 358 |          # Characters available to generate a password
 | 
	
		
			
			| 359 |  | -        characters = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
 | 
	
		
			
			| 360 |  | -
 | 
	
		
			
			| 361 |  | -                      'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j',
 | 
	
		
			
			| 362 |  | -                      'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't',
 | 
	
		
			
			| 363 |  | -                      'u', 'v', 'w', 'x', 'y', 'z',
 | 
	
		
			
			| 364 |  | -
 | 
	
		
			
			| 365 |  | -                      'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J',
 | 
	
		
			
			| 366 |  | -                      'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T',
 | 
	
		
			
			| 367 |  | -                      'U', 'V', 'W', 'X', 'Y', 'Z']
 | 
	
		
			
			|  | 359 | +        characters = '0123456789' \
 | 
	
		
			
			|  | 360 | +                     'abcdefghijklmonpqrstuvwxyz' \
 | 
	
		
			
			|  | 361 | +                     'ABCDEFGHIJKLMONPQRSTUVWXYZ'
 | 
	
		
			
			| 368 | 362 |  
 | 
	
		
			
			| 369 | 363 |          # character list that will be contained into the password
 | 
	
		
			
			| 370 | 364 |          list_char = []
 |