Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Pleroma
pleroma
Commits
956f3c75
Commit
956f3c75
authored
Dec 05, 2018
by
kaniini
Browse files
user: put default user info when registering a user
parent
ec1ec32f
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/pleroma/user.ex
View file @
956f3c75
...
...
@@ -177,6 +177,7 @@ def register_changeset(struct, params \\ %{}) do
|>
validate_format
(
:email
,
@email_regex
)
|>
validate_length
(
:bio
,
max:
1000
)
|>
validate_length
(
:name
,
min:
1
,
max:
100
)
|>
put_change
(
:info
,
%
Pleroma
.
User
.
Info
{})
if
changeset
.
valid?
do
hashed
=
Pbkdf2
.
hashpwsalt
(
changeset
.
changes
[
:password
])
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment