mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
add GetReposFiles
This commit is contained in:
@@ -13,8 +13,8 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/dchest/scrypt"
|
||||
|
||||
"github.com/gogits/gogs/modules/base"
|
||||
git "github.com/libgit2/git2go"
|
||||
)
|
||||
|
||||
var UserPasswdSalt string
|
||||
@@ -98,6 +98,14 @@ func IsEmailUsed(email string) (bool, error) {
|
||||
return orm.Get(&User{Email: email})
|
||||
}
|
||||
|
||||
func (user *User) NewGitSig() *git.Signature {
|
||||
return &git.Signature{
|
||||
Name: user.Name,
|
||||
Email: user.Email,
|
||||
When: time.Now(),
|
||||
}
|
||||
}
|
||||
|
||||
// RegisterUser creates record of a new user.
|
||||
func RegisterUser(user *User) (err error) {
|
||||
isExist, err := IsUserExist(user.Name)
|
||||
|
Reference in New Issue
Block a user