mirror of
https://github.com/hashicorp/vault.git
synced 2025-11-20 10:11:34 +01:00
Reuse the variable instead of fetching 'name' again
This commit is contained in:
parent
e51661c714
commit
cad1ee3a85
@ -46,7 +46,7 @@ func (b *backend) pathUserPasswordUpdate(
|
||||
return nil, fmt.Errorf("missing password")
|
||||
}
|
||||
|
||||
userEntry, err := b.User(req.Storage, strings.ToLower(d.Get("name").(string)))
|
||||
userEntry, err := b.User(req.Storage, username)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
@ -42,7 +42,7 @@ func (b *backend) pathUserPoliciesUpdate(
|
||||
policies[i] = strings.TrimSpace(p)
|
||||
}
|
||||
|
||||
userEntry, err := b.User(req.Storage, strings.ToLower(d.Get("name").(string)))
|
||||
userEntry, err := b.User(req.Storage, username)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user