Commit 1df48218 authored by Ilia Kosenko's avatar Ilia Kosenko

Merge branch 'docs-how-to-change-password-console' into 'master'

Commands to change user password

See merge request gitlab-org/gitlab!23580
parents 6bfc7451 c25965ea
......@@ -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