afeb8d52f72512d2b8cc87a48e07395c3d0ebba0
[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 ```sh tab="OTP"
8 ./bin/pleroma_ctl user new <nickname> <email> [option ...]
9 ```
10
11 ```sh tab="From Source"
12 mix pleroma.user new <nickname> <email> [option ...]
13 ```
14
15
16 ### Options
17 - `--name <name>` - the user's display name
18 - `--bio <bio>` - the user's bio
19 - `--password <password>` - the user's password
20 - `--moderator`/`--no-moderator` - whether the user should be a moderator
21 - `--admin`/`--no-admin` - whether the user should be an admin
22 - `-y`, `--assume-yes`/`--no-assume-yes` - whether to assume yes to all questions
23
24 ## List local users
25 ```sh tab="OTP"
26 ./bin/pleroma_ctl user list
27 ```
28
29 ```sh tab="From Source"
30 mix pleroma.user list
31 ```
32
33
34 ## Generate an invite link
35 ```sh tab="OTP"
36 ./bin/pleroma_ctl user invite [option ...]
37 ```
38
39 ```sh tab="From Source"
40 mix pleroma.user invite [option ...]
41 ```
42
43
44 ### Options
45 - `--expires-at DATE` - last day on which token is active (e.g. "2019-04-05")
46 - `--max-use NUMBER` - maximum numbers of token uses
47
48 ## List generated invites
49 ```sh tab="OTP"
50 ./bin/pleroma_ctl user invites
51 ```
52
53 ```sh tab="From Source"
54 mix pleroma.user invites
55 ```
56
57
58 ## Revoke invite
59 ```sh tab="OTP"
60 ./bin/pleroma_ctl user revoke_invite <token_or_id>
61 ```
62
63 ```sh tab="From Source"
64 mix pleroma.user revoke_invite <token_or_id>
65 ```
66
67
68 ## Delete a user
69 ```sh tab="OTP"
70 ./bin/pleroma_ctl user rm <nickname>
71 ```
72
73 ```sh tab="From Source"
74 mix pleroma.user rm <nickname>
75 ```
76
77
78 ## Delete user's posts and interactions
79 ```sh tab="OTP"
80 ./bin/pleroma_ctl user delete_activities <nickname>
81 ```
82
83 ```sh tab="From Source"
84 mix pleroma.user delete_activities <nickname>
85 ```
86
87
88 ## Sign user out from all applications (delete user's OAuth tokens and authorizations)
89 ```sh tab="OTP"
90 ./bin/pleroma_ctl user sign_out <nickname>
91 ```
92
93 ```sh tab="From Source"
94 mix pleroma.user sign_out <nickname>
95 ```
96
97
98 ## Deactivate or activate a user
99 ```sh tab="OTP"
100 ./bin/pleroma_ctl user toggle_activated <nickname>
101 ```
102
103 ```sh tab="From Source"
104 mix pleroma.user toggle_activated <nickname>
105 ```
106
107
108 ## Deactivate a user and unsubscribes local users from the user
109 ```sh tab="OTP"
110 ./bin/pleroma_ctl user deactivate NICKNAME
111 ```
112
113 ```sh tab="From Source"
114 mix pleroma.user deactivate NICKNAME
115 ```
116
117
118 ## Deactivate all accounts from an instance and unsubscribe local users on it
119 ```sh tab="OTP"
120 ./bin/pleroma_ctl user deactivate_all_from_instance <instance>
121 ```
122
123 ```sh tab="From Source"
124 mix pleroma.user deactivate_all_from_instance <instance>
125 ```
126
127
128 ## Create a password reset link for user
129 ```sh tab="OTP"
130 ./bin/pleroma_ctl user reset_password <nickname>
131 ```
132
133 ```sh tab="From Source"
134 mix pleroma.user reset_password <nickname>
135 ```
136
137
138 ## Set the value of the given user's settings
139 ```sh tab="OTP"
140 ./bin/pleroma_ctl user set <nickname> [option ...]
141 ```
142
143 ```sh tab="From Source"
144 mix pleroma.user set <nickname> [option ...]
145 ```
146
147 ### Options
148 - `--locked`/`--no-locked` - whether the user should be locked
149 - `--moderator`/`--no-moderator` - whether the user should be a moderator
150 - `--admin`/`--no-admin` - whether the user should be an admin
151
152 ## Add tags to a user
153 ```sh tab="OTP"
154 ./bin/pleroma_ctl user tag <nickname> <tags>
155 ```
156
157 ```sh tab="From Source"
158 mix pleroma.user tag <nickname> <tags>
159 ```
160
161
162 ## Delete tags from a user
163 ```sh tab="OTP"
164 ./bin/pleroma_ctl user untag <nickname> <tags>
165 ```
166
167 ```sh tab="From Source"
168 mix pleroma.user untag <nickname> <tags>
169 ```
170
171
172 ## Toggle confirmation status of the user
173 ```sh tab="OTP"
174 ./bin/pleroma_ctl user toggle_confirmed <nickname>
175 ```
176
177 ```sh tab="From Source"
178 mix pleroma.user toggle_confirmed <nickname>
179 ```