[#275] added support to customize the default user email templates from the Admin UI
This commit is contained in:
+8
-3
@@ -9,8 +9,13 @@ import (
|
||||
"golang.org/x/crypto/bcrypt"
|
||||
)
|
||||
|
||||
// DefaultIdLength is the default length of the generated model id.
|
||||
const DefaultIdLength = 15
|
||||
const (
|
||||
// DefaultIdLength is the default length of the generated model id.
|
||||
DefaultIdLength = 15
|
||||
|
||||
// DefaultIdAlphabet is the default characters set used for generating the model id.
|
||||
DefaultIdAlphabet = "abcdefghijklmnopqrstuvwxyz0123456789"
|
||||
)
|
||||
|
||||
// ColumnValueMapper defines an interface for custom db model data serialization.
|
||||
type ColumnValueMapper interface {
|
||||
@@ -98,7 +103,7 @@ func (m *BaseModel) GetUpdated() types.DateTime {
|
||||
//
|
||||
// The generated id is a cryptographically random 15 characters length string.
|
||||
func (m *BaseModel) RefreshId() {
|
||||
m.Id = security.RandomString(DefaultIdLength)
|
||||
m.Id = security.RandomStringWithAlphabet(DefaultIdLength, DefaultIdAlphabet)
|
||||
}
|
||||
|
||||
// RefreshCreated updates the model Created field with the current datetime.
|
||||
|
||||
Reference in New Issue
Block a user