more
This commit is contained in:
		
							
								
								
									
										4
									
								
								auth.go
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								auth.go
									
									
									
									
									
								
							@@ -44,10 +44,10 @@ func Login(username, password string) bool {
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func (u *UserData) SetPassword(newcrypt []byte) bool {
 | 
					func (u *UserData) SetPassword(newcrypt []byte) bool {
 | 
				
			||||||
	q := fmt.Sprintf("update %s_auth set password=? where userid=?", c.TablePrefix)
 | 
						q := fmt.Sprintf("update %s_auth set password=? where user=?", c.TablePrefix)
 | 
				
			||||||
	_, err := c.db.Exec(q, newcrypt, u.UserID)
 | 
						_, err := c.db.Exec(q, newcrypt, u.UserID)
 | 
				
			||||||
	if err != nil {
 | 
						if err != nil {
 | 
				
			||||||
		log.Printf("scsusers.ChangePassword: update failed for %s: %s\n", u.Username, err.Error())
 | 
							log.Printf("scsusers.SetPassword: update failed for %s: %s\n", u.Username, err.Error())
 | 
				
			||||||
		return false
 | 
							return false
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	return true
 | 
						return true
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user