Work on admin
This commit is contained in:
parent
9f9cd6bfc6
commit
4cf6cc63b0
6 changed files with 10 additions and 14 deletions
|
@ -137,7 +137,13 @@ func RegisterUser(user *User) (*User, error) {
|
|||
}
|
||||
return nil, err
|
||||
}
|
||||
return user, nil
|
||||
|
||||
if user.Id == 1 {
|
||||
user.IsAdmin = true
|
||||
user.IsActive = true
|
||||
_, err = orm.Id(user.Id).UseBool().Update(user)
|
||||
}
|
||||
return user, err
|
||||
}
|
||||
|
||||
// get user by erify code
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue