mirror of
https://github.com/documize/community.git
synced 2025-07-20 05:39:42 +02:00
parent
3d6727ff4c
commit
d4062db02d
2 changed files with 4 additions and 2 deletions
|
@ -685,6 +685,8 @@ func AcceptSharedFolder(w http.ResponseWriter, r *http.Request) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
p.Context.UserID = user.RefID
|
||||||
|
|
||||||
salt := util.GenerateSalt()
|
salt := util.GenerateSalt()
|
||||||
|
|
||||||
log.IfErr(p.UpdateUserPassword(user.RefID, salt, util.GeneratePassword(model.Password, salt)))
|
log.IfErr(p.UpdateUserPassword(user.RefID, salt, util.GeneratePassword(model.Password, salt)))
|
||||||
|
|
|
@ -147,12 +147,12 @@ func AddUser(w http.ResponseWriter, r *http.Request) {
|
||||||
// set up user account for the org
|
// set up user account for the org
|
||||||
if addAccount {
|
if addAccount {
|
||||||
var a entity.Account
|
var a entity.Account
|
||||||
|
a.RefID = util.UniqueID()
|
||||||
a.UserID = userID
|
a.UserID = userID
|
||||||
a.OrgID = p.Context.OrgID
|
a.OrgID = p.Context.OrgID
|
||||||
a.Editor = true
|
a.Editor = true
|
||||||
a.Admin = false
|
a.Admin = false
|
||||||
accountID := util.UniqueID()
|
a.Active = true
|
||||||
a.RefID = accountID
|
|
||||||
|
|
||||||
err = p.AddAccount(a)
|
err = p.AddAccount(a)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue