Init the user token before adding users.
authorASchulz <aschulz@wikimedia.org>
Wed, 27 Feb 2013 00:17:58 +0000 (16:17 -0800)
committerGerrit Code Review <gerrit@wikimedia.org>
Wed, 27 Feb 2013 17:28:17 +0000 (17:28 +0000)
commit873970eda91251d5793a42f930d180e72cc84ad9
treea01356ddc501690fa91032ca353c482b21216c49
parent8f2f6d3b0cb683881d45f5fa25be289a0806034d
Init the user token before adding users.

* The DB column has garbage padding as the default value, which
  was intented to just be "". Since the the insert functions cast
  the value to a string, inserting a user without creating a token
  causes garbage to be inserted. The logic to automatically fix
  empty tokens does not trigger. This fixes createNew() to set the
  token and makes sure that addToDatabase() does.

Change-Id: I3529fe8afbc62bac37063217d5aa0179a4a6e169
includes/User.php