Commit c25965ea authored by mac-key's avatar mac-key

Commands to change user password

parent 74bfdf4f
......@@ -542,6 +542,20 @@ group = Group.find_by_full_path 'group'
user.max_member_access_for_group group.id
```
### Change user password
```ruby
password = "your password"
user = User.find_by_username('your username')
password_attributes = {
password: password,
password_confirmation: password,
password_automatically_set: false
}
result = Users::UpdateService.new(user, password_attributes.merge(user: user)).execute
```
## Groups
### Count unique users in a group and sub-groups
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment