// SetEmail checks and updates user's email address.
// First return value determines whether the email was set or not.
SetEmail checks and updates user's email address.
First return value determines whether the email was set or not.
// SetEmail checks and updates user ' s email address . // First return value determines whether the email was set or not .
func (c *Core) SetEmail(e string) (bool, error) {
	if e == "" {
		if c.Email == "" {
			return false, ErrInvalidEmail
		}
		return false, nil
	}
	if c.Email == e {
		return false, nil
	}
	if c.Email != "" {
		return c.SetUnverifiedEmail(e)
	}
	if err := CheckEmail(e); err != nil {
		return false, err
	}
	c.Email = e
	return true, nil
}
func ( c * Core ) SetEmail ( e string ) ( bool , error ) { if e == " " { if c . Email == " " { return false , ErrInvalidEmail } return false , nil } if c . Email == e { return false , nil } if c . Email != " " { return c . SetUnverifiedEmail ( e ) } if err := CheckEmail ( e ) ; err != nil { return false , err } c . Email = e return true , nil }
SetEmail checks and updates user's email address.
SetEmail checks and updates user ' s email address .