diff options
Diffstat (limited to 'models/user.go')
-rw-r--r-- | models/user.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/models/user.go b/models/user.go index 93fdc6f4af..eafc53d6f1 100644 --- a/models/user.go +++ b/models/user.go @@ -146,6 +146,13 @@ type User struct { Theme string `xorm:"NOT NULL DEFAULT ''"` } +// ColorFormat writes a colored string to identify this struct +func (u *User) ColorFormat(s fmt.State) { + log.ColorFprintf(s, "%d:%s", + log.NewColoredIDValue(u.ID), + log.NewColoredValue(u.Name)) +} + // BeforeUpdate is invoked from XORM before updating this object. func (u *User) BeforeUpdate() { if u.MaxRepoCreation < -1 { |