After trying this module on migration from d5 to d6 I got some errors!
1) Because of module validation happens before others (user module validations) it suppose that username is always user@server - it's wrong (some logins are just username) so added check for this situation and change "noticeable" explode
2) After xmlrpc-call $aid is UID so user_external_load($aid) always failed and user_external_login_register happens - so no hook_user(login ) ever happens
Next some fixes in logic
- check for default server and server_only
Suppose there's no need in
$form_state['#validate'] = array();
$form_state['#submit'] = array();
because '_site_network_login_validate' already in validation loop and it's not possible to stop it
I make ...2.patch file with this changes
| Comment | File | Size | Author |
|---|---|---|---|
| site_network.authentication.inc2_.patch | 2.4 KB | andypost | |
| site_network.authentication.inc_.patch | 1.92 KB | andypost |
Comments
Comment #1
andypostAnother problem - when registering if profile module enabled
user_external_login_register -> user_save -> profile_save_profile -> _profile_get_fields -> user_access('administer users')
when user is registering there's no global $user variable
suppose this issue for core...
ups ... fixed in 6.4
Comment #2
brmassa commentedAndrey,
thanks again.
1* if explode() cannot find any "@", it will return a simple array. it is faster than doing multiple substr(). $server will be NULL.
2* the external load bug fixed. thanks.
regards,
massa
Comment #3
andypostMassa, trying to use explode and $name[1] brings php notice
(If delimiter contains a value that is not contained in string, then explode() will return an array containing string. )
Better replace
With
It's more readable and optimized :) and no notices in log
Comment #4
brmassa commentedAndrey,
great. commited!
regards,
massa
Comment #5
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.