Merge branch 'release/2.2.0' into 'stable'
[akkoma] / docs / administration / CLI_tasks / user.md
1 # Managing users
2
3 {! backend/administration/CLI_tasks/general_cli_task_info.include !}
4
5 ## Create a user
6
7 === "OTP"
8
9 ```sh
10 ./bin/pleroma_ctl user new <nickname> <email> [option ...]
11 ```
12
13 === "From Source"
14
15 ```sh
16 mix pleroma.user new <nickname> <email> [option ...]
17 ```
18
19
20 ### Options
21 - `--name <name>` - the user's display name
22 - `--bio <bio>` - the user's bio
23 - `--password <password>` - the user's password
24 - `--moderator`/`--no-moderator` - whether the user should be a moderator
25 - `--admin`/`--no-admin` - whether the user should be an admin
26 - `-y`, `--assume-yes`/`--no-assume-yes` - whether to assume yes to all questions
27
28 ## List local users
29
30 === "OTP"
31
32 ```sh
33 ./bin/pleroma_ctl user list
34 ```
35
36 === "From Source"
37
38 ```sh
39 mix pleroma.user list
40 ```
41
42
43 ## Generate an invite link
44
45 === "OTP"
46
47 ```sh
48 ./bin/pleroma_ctl user invite [option ...]
49 ```
50
51 === "From Source"
52
53 ```sh
54 mix pleroma.user invite [option ...]
55 ```
56
57
58 ### Options
59 - `--expires-at DATE` - last day on which token is active (e.g. "2019-04-05")
60 - `--max-use NUMBER` - maximum numbers of token uses
61
62 ## List generated invites
63
64 === "OTP"
65
66 ```sh
67 ./bin/pleroma_ctl user invites
68 ```
69
70 === "From Source"
71
72 ```sh
73 mix pleroma.user invites
74 ```
75
76
77 ## Revoke invite
78
79 === "OTP"
80
81 ```sh
82 ./bin/pleroma_ctl user revoke_invite <token>
83 ```
84
85 === "From Source"
86
87 ```sh
88 mix pleroma.user revoke_invite <token>
89 ```
90
91
92 ## Delete a user
93
94 === "OTP"
95
96 ```sh
97 ./bin/pleroma_ctl user rm <nickname>
98 ```
99
100 === "From Source"
101
102 ```sh
103 mix pleroma.user rm <nickname>
104 ```
105
106
107 ## Delete user's posts and interactions
108
109 === "OTP"
110
111 ```sh
112 ./bin/pleroma_ctl user delete_activities <nickname>
113 ```
114
115 === "From Source"
116
117 ```sh
118 mix pleroma.user delete_activities <nickname>
119 ```
120
121
122 ## Sign user out from all applications (delete user's OAuth tokens and authorizations)
123
124 === "OTP"
125
126 ```sh
127 ./bin/pleroma_ctl user sign_out <nickname>
128 ```
129
130 === "From Source"
131
132 ```sh
133 mix pleroma.user sign_out <nickname>
134 ```
135
136
137 ## Deactivate or activate a user
138
139 === "OTP"
140
141 ```sh
142 ./bin/pleroma_ctl user toggle_activated <nickname>
143 ```
144
145 === "From Source"
146
147 ```sh
148 mix pleroma.user toggle_activated <nickname>
149 ```
150
151
152 ## Deactivate a user and unsubscribes local users from the user
153
154 === "OTP"
155
156 ```sh
157 ./bin/pleroma_ctl user deactivate NICKNAME
158 ```
159
160 === "From Source"
161
162 ```sh
163 mix pleroma.user deactivate NICKNAME
164 ```
165
166
167 ## Deactivate all accounts from an instance and unsubscribe local users on it
168
169 === "OTP"
170
171 ```sh
172 ./bin/pleroma_ctl user deactivate_all_from_instance <instance>
173 ```
174
175 === "From Source"
176
177 ```sh
178 mix pleroma.user deactivate_all_from_instance <instance>
179 ```
180
181
182 ## Create a password reset link for user
183
184 === "OTP"
185
186 ```sh
187 ./bin/pleroma_ctl user reset_password <nickname>
188 ```
189
190 === "From Source"
191
192 ```sh
193 mix pleroma.user reset_password <nickname>
194 ```
195
196
197 ## Disable Multi Factor Authentication (MFA/2FA) for a user
198
199 === "OTP"
200
201 ```sh
202 ./bin/pleroma_ctl user reset_mfa <nickname>
203 ```
204
205 === "From Source"
206
207 ```sh
208 mix pleroma.user reset_mfa <nickname>
209 ```
210
211
212 ## Set the value of the given user's settings
213
214 === "OTP"
215
216 ```sh
217 ./bin/pleroma_ctl user set <nickname> [option ...]
218 ```
219
220 === "From Source"
221
222 ```sh
223 mix pleroma.user set <nickname> [option ...]
224 ```
225
226 ### Options
227 - `--admin`/`--no-admin` - whether the user should be an admin
228 - `--confirmed`/`--no-confirmed` - whether the user account is confirmed
229 - `--locked`/`--no-locked` - whether the user should be locked
230 - `--moderator`/`--no-moderator` - whether the user should be a moderator
231
232 ## Add tags to a user
233
234 === "OTP"
235
236 ```sh
237 ./bin/pleroma_ctl user tag <nickname> <tags>
238 ```
239
240 === "From Source"
241
242 ```sh
243 mix pleroma.user tag <nickname> <tags>
244 ```
245
246
247 ## Delete tags from a user
248
249 === "OTP"
250
251 ```sh
252 ./bin/pleroma_ctl user untag <nickname> <tags>
253 ```
254
255 === "From Source"
256
257 ```sh
258 mix pleroma.user untag <nickname> <tags>
259 ```
260
261
262 ## Toggle confirmation status of the user
263
264 === "OTP"
265
266 ```sh
267 ./bin/pleroma_ctl user toggle_confirmed <nickname>
268 ```
269
270 === "From Source"
271
272 ```sh
273 mix pleroma.user toggle_confirmed <nickname>
274 ```
275
276 ## Set confirmation status for all regular active users
277 *Admins and moderators are excluded*
278
279 === "OTP"
280
281 ```sh
282 ./bin/pleroma_ctl user confirm_all
283 ```
284
285 === "From Source"
286
287 ```sh
288 mix pleroma.user confirm_all
289 ```
290
291 ## Revoke confirmation status for all regular active users
292 *Admins and moderators are excluded*
293
294 === "OTP"
295
296 ```sh
297 ./bin/pleroma_ctl user unconfirm_all
298 ```
299
300 === "From Source"
301
302 ```sh
303 mix pleroma.user unconfirm_all
304 ```