Register with json:

When I create an account with following json code:

{"name":"register test", "mail": "user@user.com", "pass": "123"}

It response successful:

{"uid":"14","uri":"http://192.168.137.124/daxuebao/api/user/14"}

This above is totally correct.

Login with json:

But when I post to /login with following json code:

{"name":"register test", "pass":"123"}

It alert me :

["Missing required argument password"]

Then I try to change pass field to password, It login correct!

So:

I consider why not uniform use pass or password?

If there somebody develop android application, You will know about GSON, The different password and pass is very trouble.

CommentFileSizeAuthor
#7 pass-and-password-field.patch2.64 KBTangMonk

Comments

TangMonk’s picture

Issue summary: View changes
TangMonk’s picture

Issue summary: View changes
marcingy’s picture

Status: Active » Closed (won't fix)

This is a duplicate of an old issue (can't find it off hand) and won't fix as will break sites that already exist

TangMonk’s picture

@marcingy, I want to figure it out, can you create a patch for me? or just tell me how to do.

thanks.

TangMonk’s picture

Status: Closed (won't fix) » Active

I can not find the duplicate issue.
so I need some help me.
Just tell me how can I modify the user_resource file, Or upload a patch for me.
thanks.

marcingy’s picture

Status: Active » Closed (won't fix)

This is won't fix as I said, the duplicate has no answer. It was closed as the feature request will never be implemented in services as it breaks backwards computability so there is not going to be a patch or instructions on how to do it.

TangMonk’s picture

StatusFileSize
new2.64 KB

I don't know how to write test, but this patch can work.