AuthManager: Commit transaction after auto-creating a user
authorBrad Jorsch <bjorsch@wikimedia.org>
Tue, 12 Jul 2016 17:35:10 +0000 (13:35 -0400)
committerBrad Jorsch <bjorsch@wikimedia.org>
Tue, 12 Jul 2016 17:35:10 +0000 (13:35 -0400)
commit83c66caa0831086db7c2033ddda38106584060d0
tree646d05f95e4f411bd5d971b5dd8c4c5a01a4e398
parentaf7ffaeeecd1908351863c0e928b8c5dcfb033fc
AuthManager: Commit transaction after auto-creating a user

As things stand now, DBO_TRX or DBO_DEFAULT will cause a transaction to
be started, and then anything in the entire request failing will
probably cause the newly-added user row to be lost. But updates to
external databases (e.g. CentralAuth) likely won't be since those DB
connections were probably shut down after the update was completed.

So let's explicitly commit changes af the end of auto-creation so that
problems with the request itself don't undo it.

Bug: T119736
Change-Id: I6c13c8feb86d8b9a01df894733c38445d048fea0
includes/auth/AuthManager.php