Make a new function instead of overloading register_changeset/3
authorMark Felder <feld@FreeBSD.org>
Fri, 7 Aug 2020 19:54:14 +0000 (14:54 -0500)
committerMark Felder <feld@FreeBSD.org>
Fri, 7 Aug 2020 19:54:14 +0000 (14:54 -0500)
lib/pleroma/user.ex
lib/pleroma/web/auth/ldap_authenticator.ex

index 69b0e1781d0c911f541ba46aeeb7b283abc3b798..d1436a688455b2eeab07c883d612a56eeb1103c3 100644 (file)
@@ -639,7 +639,7 @@ defmodule Pleroma.User do
   def force_password_reset(user), do: update_password_reset_pending(user, true)
 
   # Used to auto-register LDAP accounts which won't have a password hash stored locally
-  def register_changeset(struct, params = %{password: password})
+  def register_changeset_ldap(struct, params = %{password: password})
       when is_nil(password) do
     params = Map.put_new(params, :accepts_chat_messages, true)
 
index b1645a3591d9aa58a78872608bde203a888a6828..402ab428b5244413727dd9eeb80a71320fc7bdc2 100644 (file)
@@ -116,7 +116,7 @@ defmodule Pleroma.Web.Auth.LDAPAuthenticator do
             _ -> params
           end
 
-        changeset = User.register_changeset(%User{}, params)
+        changeset = User.register_changeset_ldap(%User{}, params)
 
         case User.register(changeset) do
           {:ok, user} -> user