mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Add mention, read/unread support of issue tracker
This commit is contained in:
@@ -304,7 +304,7 @@ func DeleteUser(user *User) error {
|
||||
}
|
||||
|
||||
// Delete all watches.
|
||||
if _, err = orm.Delete(&Watch{UserId: user.Id}); err != nil {
|
||||
if _, err = orm.Delete(&Watch{Uid: user.Id}); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -392,6 +392,19 @@ func GetUserEmailsByNames(names []string) []string {
|
||||
return mails
|
||||
}
|
||||
|
||||
// GetUserIdsByNames returns a slice of ids corresponds to names.
|
||||
func GetUserIdsByNames(names []string) []int64 {
|
||||
ids := make([]int64, 0, len(names))
|
||||
for _, name := range names {
|
||||
u, err := GetUserByName(name)
|
||||
if err != nil {
|
||||
continue
|
||||
}
|
||||
ids = append(ids, u.Id)
|
||||
}
|
||||
return ids
|
||||
}
|
||||
|
||||
// GetUserByEmail returns the user object by given e-mail if exists.
|
||||
func GetUserByEmail(email string) (*User, error) {
|
||||
if len(email) == 0 {
|
||||
|
Reference in New Issue
Block a user