discourse/discourse — pull request #2489 by techAPJ (2014-07-01 20:41:00+00:00)
Title: Update admin rake task

Updated `admin:create` task, this PR adds:

* Checks if the email already exists in database
* If email already exists, asks user if they want to update password
* Asks user if they want to grant admin privileges
* In case of new account, the username is generated randomly (exp. admin_2476), earlier the username was fixed `admin`, so this task was usable only once
* Added confirmations, so user knows exactly what is happening