summaryrefslogtreecommitdiff
path: root/docs/administration/CLI_tasks/user.md
blob: da8363131b0167408542b8618b4abe0f7a9171f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
# Managing users

{! backend/administration/CLI_tasks/general_cli_task_info.include !}

## Create a user

```sh tab="OTP"
./bin/pleroma_ctl user new <email> [<options>]
```

```sh tab="From Source"
mix pleroma.user new <email> [<options>]
```


### Options
- `--name <name>` - the user's display name
- `--bio <bio>` - the user's bio
- `--password <password>` - the user's password
- `--moderator`/`--no-moderator` - whether the user should be a moderator
- `--admin`/`--no-admin` - whether the user should be an admin
- `-y`, `--assume-yes`/`--no-assume-yes` - whether to assume yes to all questions

## List local users
```sh tab="OTP"
 ./bin/pleroma_ctl user list
```

```sh tab="From Source"
mix pleroma.user list
```


## Generate an invite link
```sh tab="OTP"
 ./bin/pleroma_ctl user invite [<options>]
```

```sh tab="From Source"
mix pleroma.user invite [<options>]
```


### Options
- `--expires-at DATE` - last day on which token is active (e.g. "2019-04-05")
- `--max-use NUMBER` - maximum numbers of token uses

## List generated invites
```sh tab="OTP"
 ./bin/pleroma_ctl user invites
```

```sh tab="From Source"
mix pleroma.user invites
```


## Revoke invite
```sh tab="OTP"
 ./bin/pleroma_ctl user revoke_invite <token_or_id>
```

```sh tab="From Source"
mix pleroma.user revoke_invite <token_or_id>
```


## Delete a user
```sh tab="OTP"
 ./bin/pleroma_ctl user rm <nickname>
```

```sh tab="From Source"
mix pleroma.user rm <nickname>
```


## Delete user's posts and interactions
```sh tab="OTP"
 ./bin/pleroma_ctl user delete_activities <nickname>
```

```sh tab="From Source"
mix pleroma.user delete_activities <nickname>
```


## Sign user out from all applications (delete user's OAuth tokens and authorizations)
```sh tab="OTP"
 ./bin/pleroma_ctl user sign_out <nickname>
```

```sh tab="From Source"
mix pleroma.user sign_out <nickname>
```


## Deactivate or activate a user 
```sh tab="OTP"
 ./bin/pleroma_ctl user toggle_activated <nickname> 
```

```sh tab="From Source"
mix pleroma.user toggle_activated <nickname> 
```


## Unsubscribe local users from a user and deactivate the user
```sh tab="OTP"
 ./bin/pleroma_ctl user unsubscribe NICKNAME
```

```sh tab="From Source"
mix pleroma.user unsubscribe NICKNAME
```


## Unsubscribe local users from an instance and deactivate all accounts on it
```sh tab="OTP"
 ./bin/pleroma_ctl user unsubscribe_all_from_instance <instance>
```

```sh tab="From Source"
mix pleroma.user unsubscribe_all_from_instance <instance>
```


## Create a password reset link for user
```sh tab="OTP"
 ./bin/pleroma_ctl user reset_password <nickname>
```

```sh tab="From Source"
mix pleroma.user reset_password <nickname>
```


## Set the value of the given user's settings
```sh tab="OTP"
 ./bin/pleroma_ctl user set <nickname> [<options>]
```

```sh tab="From Source"
mix pleroma.user set <nickname> [<options>]
```

### Options
- `--locked`/`--no-locked` - whether the user should be locked
- `--moderator`/`--no-moderator` - whether the user should be a moderator
- `--admin`/`--no-admin` - whether the user should be an admin

## Add tags to a user
```sh tab="OTP"
 ./bin/pleroma_ctl user tag <nickname> <tags>
```

```sh tab="From Source"
mix pleroma.user tag <nickname> <tags>
```


## Delete tags from a user
```sh tab="OTP"
 ./bin/pleroma_ctl user untag <nickname> <tags>
```

```sh tab="From Source"
mix pleroma.user untag <nickname> <tags>
```


## Toggle confirmation status of the user
```sh tab="OTP"
 ./bin/pleroma_ctl user toggle_confirmed <nickname>
```

```sh tab="From Source"
mix pleroma.user toggle_confirmed <nickname>
```