More fixes
This commit is contained in:
@@ -2,8 +2,6 @@ package internal
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"net/url"
|
||||
"time"
|
||||
|
||||
"github.com/creasty/defaults"
|
||||
@@ -73,12 +71,7 @@ func LoadUser(data []byte) (user *User, err error) {
|
||||
}
|
||||
|
||||
func (u *User) String() string {
|
||||
url, err := url.Parse(u.URL)
|
||||
if err != nil {
|
||||
log.WithError(err).Warn("error parsing user url")
|
||||
return u.Username
|
||||
}
|
||||
return fmt.Sprintf("%s@%s", u.Username, url.Hostname())
|
||||
return u.Username
|
||||
}
|
||||
|
||||
// HasToken will add a token to a user if it doesn't exist already
|
||||
|
||||
Reference in New Issue
Block a user