mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-17 23:42:52 +00:00
chore: remove deadcode in models/user
- Remove `ErrUserInactive` introduced inf5fa22a499
and removed inef2a343e27
- Remove `GetUserEmailsByNames` introduced ina4cbe79567
and removed in08ae6bb7ed
- Remove `GetUserNamesByIDs` introduced in9ff4e1d2d9
and removed inb3a6596b54
This commit is contained in:
parent
fd285bfc4e
commit
801c392e0c
6 changed files with 0 additions and 81 deletions
|
@ -71,27 +71,6 @@ func (err ErrUserProhibitLogin) Unwrap() error {
|
|||
return util.ErrPermissionDenied
|
||||
}
|
||||
|
||||
// ErrUserInactive represents a "ErrUserInactive" kind of error.
|
||||
type ErrUserInactive struct {
|
||||
UID int64
|
||||
Name string
|
||||
}
|
||||
|
||||
// IsErrUserInactive checks if an error is a ErrUserInactive
|
||||
func IsErrUserInactive(err error) bool {
|
||||
_, ok := err.(ErrUserInactive)
|
||||
return ok
|
||||
}
|
||||
|
||||
func (err ErrUserInactive) Error() string {
|
||||
return fmt.Sprintf("user is inactive [uid: %d, name: %s]", err.UID, err.Name)
|
||||
}
|
||||
|
||||
// Unwrap unwraps this error as a ErrPermission error
|
||||
func (err ErrUserInactive) Unwrap() error {
|
||||
return util.ErrPermissionDenied
|
||||
}
|
||||
|
||||
// ErrUserIsNotLocal represents a "ErrUserIsNotLocal" kind of error.
|
||||
type ErrUserIsNotLocal struct {
|
||||
UID int64
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue