parent
							
								
									a482a083bf
								
							
						
					
					
						commit
						5e5121fc65
					
				
					 2 changed files with 18 additions and 6 deletions
				
			
		|  | @ -181,6 +181,13 @@ func UpdateUserPassword(claims *types.Claims, password string) error { | |||
| 		return err | ||||
| 	} | ||||
| 
 | ||||
| 	// Temporarily set PW as plaintext, for validation purposes | ||||
| 	user.Password = password | ||||
| 
 | ||||
| 	if err := user.validate(); err != nil { | ||||
| 		return err | ||||
| 	} | ||||
| 
 | ||||
| 	hash, err := bcrypt.GenerateFromPassword([]byte(password), 12) | ||||
| 	if err != nil { | ||||
| 		return err | ||||
|  |  | |||
		Reference in a new issue
	
	 Matthew Dillon
						Matthew Dillon