### Changed
+- **Breaking:** Removed the toggle_activated mix task
- Polls now always return a `voters_count`, even if they are single-choice.
- Admin Emails: The ap id is used as the user link in emails now.
- Improved registration workflow for email confirmation and account approval modes.
```
-## Deactivate or activate a user
-
-=== "OTP"
-
- ```sh
- ./bin/pleroma_ctl user toggle_activated <nickname>
- ```
-
-=== "From Source"
-
- ```sh
- mix pleroma.user toggle_activated <nickname>
- ```
-
-
## Deactivate a user and unsubscribes local users from the user
=== "OTP"
end
end
- def run(["toggle_activated", nickname]) do
- start_pleroma()
-
- with %User{} = user <- User.get_cached_by_nickname(nickname) do
- {:ok, user} = User.deactivate(user, user.is_active)
-
- shell_info(
- "Activation status of #{nickname}: #{unless(user.is_active, do: "de", else: "")}activated"
- )
- else
- _ ->
- shell_error("No user #{nickname}")
- end
- end
-
def run(["reset_password", nickname]) do
start_pleroma()
end
end
- describe "running toggle_activated" do
- test "user is deactivated" do
- user = insert(:user)
-
- Mix.Tasks.Pleroma.User.run(["toggle_activated", user.nickname])
-
- assert_received {:mix_shell, :info, [message]}
- assert message =~ " deactivated"
-
- user = User.get_cached_by_nickname(user.nickname)
- refute user.is_active
- end
-
- test "user is activated" do
- user = insert(:user, is_active: false)
-
- Mix.Tasks.Pleroma.User.run(["toggle_activated", user.nickname])
-
- assert_received {:mix_shell, :info, [message]}
- assert message =~ " activated"
-
- user = User.get_cached_by_nickname(user.nickname)
- assert user.is_active
- end
-
- test "no user to toggle" do
- Mix.Tasks.Pleroma.User.run(["toggle_activated", "nonexistent"])
-
- assert_received {:mix_shell, :error, [message]}
- assert message =~ "No user"
- end
- end
-
describe "running deactivate" do
test "user is unsubscribed" do
followed = insert(:user)