User created via REST not recognized for login
[I'm not sure what component is at fault here, so I'm reporting against the API that I use.]
In the "develop" environment, I created a user as follows (language is Perl, but should be readable).
I can recover the user information that I set as shown below. So I'm pretty sure I got this part right.
However, I am unable to login using this user.
Further, If I try a password RESET, I get The e-mail address is not assigned to any user account
The only odd thing is that the password reset page shows "Example.com", though that domain was deleted and replaced.
So perhaps the GUI & core aren't communicating?
By request, the following has been edited to remove site-specific info, which may have introduced minor errors.
# Create user
$api->POST( '/members', {list_id=>'scorecard.example.net',subscriber=>'auser@example.org',display_name=>'Random user',pre_verified=>1,pre_confirmed=>1,pre_approved=>1})
0 201
$api->response->request->as_string,$api->response->as_string
0 'POST http://resthost.example.net:8001/3.1/members
Accept: application/json
Authorization: Basic redacted
User-Agent: vth-mailman/1.000
Content-Length: 126
Content-Type: application/x-www-form-urlencoded
pre_verified=1&subscriber=auser%40example.org&pre_approved=1&list_id=scorecard.example.net&pre_confirmed=1&display_name=Random+user
'
# Note Location in response => new member
1 'HTTP/1.0 201 Created
Date: Sun, 25 Jun 2017 10:55:13 GMT
Location: http://resthost.example.net:8001/3.1/members/b5f75b80cf674a5bb35a55c7d1a42f3c
Server: WSGIServer/0.2 CPython/3.5.3
Content-Length: 0
Content-Type: application/json; charset=UTF-8
Client-Date: Sun, 25 Jun 2017 10:55:17 GMT
Client-Peer: 192.168.148.19:8001
Client-Response-Num: 1
'
# This represents a robot, so suspend delivery & notices
$api->PATCH('/members/b5f75b80cf674a5bb35a55c7d1a42f3c/preferences',{delivery_status=>'by_user',receive_own_postings=>0,receive_list_copy=>0,receive_list_copy=>0,acknowledge_posts=>0})
0 204
# Auto-accept all posts
$api->PATCH('/members/b5f75b80cf674a5bb35a55c7d1a42f3c',{moderation_action=>'accept'})
0 204
# View member
$api->get('/members/b5f75b80cf674a5bb35a55c7d1a42f3c')
0 200
1 HASH(0x9aa669c)
'address' => 'http://resthost.example.net:8001/3.1/addresses/auser@example.org'
'delivery_mode' => 'regular'
'email' => 'auser@example.org'
'http_etag' => '"61b0975f046ac5cb7970706d31178ad082c67da6"'
'list_id' => 'scorecard.example.net'
'member_id' => 'b5f75b80cf674a5bb35a55c7d1a42f3c'
'moderation_action' => 'accept'
'role' => 'member'
'self_link' => 'http://resthost.example.net:8001/3.1/members/b5f75b80cf674a5bb35a55c7d1a42f3c'
'user' => 'http://resthost.example.net:8001/3.1/users/6ef0aaa051a341d39c5bf4b0f0cc1eaf'
# Set Password ( - yes, I used the string "Random" )
$api->PATCH( '/users/6ef0aaa051a341d39c5bf4b0f0cc1eaf',{cleartext_password => 'Random'})
0 204
# And add a display name
$api->PATCH( '/users/6ef0aaa051a341d39c5bf4b0f0cc1eaf',{cleartext_password => 'Random',display_name=>'User-level display name'})
0 204
# User exists
$api->get('/users/6ef0aaa051a341d39c5bf4b0f0cc1eaf')
0 200
1 HASH(0x9a9f65c)
'created_on' => '2017-06-25T10:55:12.815155'
'display_name' => 'User-level display name'
'http_etag' => '"f9ea3b5d482e252995cd0c448ded2813d5f404a1"'
'is_server_owner' => JSON::PP::Boolean=SCALAR(0x8fce90c)
-> 0
'password' => '$6$rounds=656000$ziz/RqVb7yVCFA1i$RW9SSAnRdznSutLIQTD//GyFQN0aVeIErV52lplnbIabCkpvVar4bRrP5TL/56tXa4DvSGApzuDt1/9dG.oxr/'
'self_link' => 'http://resthost.example.net:8001/3.1/users/6ef0aaa051a341d39c5bf4b0f0cc1eaf'
'user_id' => '6ef0aaa051a341d39c5bf4b0f0cc1eaf'
# Verify that user owns address
$api->get('/users/6ef0aaa051a341d39c5bf4b0f0cc1eaf/addresses')
0 200
1 HASH(0x9aa6300)
'entries' => ARRAY(0x9a9f4d0)
0 HASH(0x9a9f224)
'display_name' => 'Random+user'
'email' => 'auser@example.org'
'http_etag' => '"a673be2aed5004beff519d2fc0e4e6f2f137a4af"'
'original_email' => 'auser@example.org'
'registered_on' => '2017-06-25T10:55:12.654442'
'self_link' => 'http://resthost.example.net:8001/3.1/addresses/auser@example.org'
'user' => 'http://resthost.example.net:8001/3.1/users/6ef0aaa051a341d39c5bf4b0f0cc1eaf'
'verified_on' => '2017-06-25T10:55:12.982422'
'http_etag' => '"e44531dee4ef84104bc9b196e7634ac2115de45f"'
'start' => 0
'total_size' => 1
```
On the mailman-suite console, all we have is:
[25/Jun/2017 11:59:12] "GET /accounts/login/?next=/hyperkitty/ HTTP/1.1" 200 10882 [25/Jun/2017 11:59:12] "GET /static/CACHE/css/hyperkitty.fdbb3398648f.css HTTP/1.1" 200 156596 [25/Jun/2017 11:59:52] "POST /accounts/login/ HTTP/1.1" 200 11058 [25/Jun/2017 11:59:52] "GET /static/CACHE/css/hyperkitty.fdbb3398648f.css HTTP/1.1" 200 156596 [25/Jun/2017 12:00:41] "GET /accounts/password/reset/ HTTP/1.1" 200 7765 [25/Jun/2017 12:00:41] "GET /static/CACHE/css/hyperkitty.fdbb3398648f.css HTTP/1.1" 200 156596 [25/Jun/2017 12:01:01] "POST /accounts/password/reset/ HTTP/1.1" 200 7912 [25/Jun/2017 12:01:01] "GET /static/CACHE/css/hyperkitty.fdbb3398648f.css HTTP/1.1" 200 156596