user: add is_internal_user? helper function
This commit is contained in:
parent
0a6f6e1b5b
commit
62e5ff624e
2 changed files with 21 additions and 0 deletions
|
|
@ -1410,4 +1410,8 @@ defmodule Pleroma.User do
|
|||
end
|
||||
|
||||
defp put_password_hash(changeset), do: changeset
|
||||
|
||||
def is_internal_user?(%User{nickname: nil}), do: true
|
||||
def is_internal_user?(%User{local: true, nickname: "internal." <> _}), do: true
|
||||
def is_internal_user?(_), do: false
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue