mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-14 05:52:43 +00:00
add GetReposFiles
This commit is contained in:
parent
b5cc4078a9
commit
23400dd0a2
2 changed files with 87 additions and 28 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue