Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
user.module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
27 Feb 2014 at 13:27 UTC
Updated:
29 Jul 2014 at 23:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
damiankloip commentedComment #2
damiankloip commentedNeeds tests, probably a conversion for BasicAuth, amongst other things.
Comment #5
dawehner+1 for the idea!
Seriously we should inject it, so other people also follow us.
Shit, really?
A bit more types would be helpful.
Comment #6
damiankloip commentedGood Points, thanks! That initial patch was sloppy...
Also added a UserAuthInterface.
Comment #8
damiankloip commentedSorry, that patch totally doesn't work. New patch coming shortly. Going to add a unit test while I'm there.
Comment #9
damiankloip commentedFixed the 'arguements' typo in user.services.yml and the loadByProperty() call. Also added unit tests - I would say that's pretty thorough coverage.
Comment #10
klausiThat's a bad name. Since we also have $password in the authenticate() method this can get confusing. Better use $passwordService or $passwordChecker or $passwordHasher.
Missing @param docs.
The PHPUnit test looks superb, great work!
You should also convert BasicAuth to use this service and then remove user_authenticate() (or mark it @deprecated and call the service?). UserLoginForm and BasicAuth are the only two instances that use it.
Comment #11
damiankloip commentedThanks klausi! Much appreciated.
Also converted the actual user_authenticate function to use the new service too.
Here are those changes, think it takes care of everything now...
Comment #12
damiankloip commentedComment #13
damiankloip commentedUgh, wrong service name.
Comment #14
dawehner<3
Comment #15
damiankloip commentedWe can remove this I think :)
Comment #16
alexpottWe need a change record for this - once one exists can set back to rtbc.
Comment #17
damiankloip commentedDone! https://drupal.org/node/2214507
Comment #18
alexpottCommitted 8bab667 and pushed to 8.x. Thanks!