// ApplyInput applies modification to user's core fields and sets new update
// time.
ApplyInput applies modification to user's core fields and sets new update
time.
// ApplyInput applies modification to user ' s core fields and sets new update // time .
func (c *Core) ApplyInput(inp Inputer) (Summary, error) {
	cInp := inp.ExposeCore()
	eml, err := c.SetEmail(cInp.Email)
	if err != nil {
		return nil, err
	}
	pass, err := c.UpdatePassword(cInp.OldPassword, cInp.Password)
	if err != nil {
		return nil, err
	}
	c.UpdatedAt = timeutil.Now()
	return CoreSummary{
		Email:    eml,
		Password: pass,
	}, nil
}
func ( c * Core ) ApplyInput ( inp Inputer ) ( Summary , error ) { cInp := inp . ExposeCore ( ) eml , err := c . SetEmail ( cInp . Email ) if err != nil { return nil , err } pass , err := c . UpdatePassword ( cInp . OldPassword , cInp . Password ) if err != nil { return nil , err } c . UpdatedAt = timeutil . Now ( ) return CoreSummary { Email : eml , Password : pass , } , nil }
ApplyInput applies modification to user's core fields and sets new update
time.
ApplyInput applies modification to user ' s core fields and sets new update time .