Skip to content

Commit

Permalink
Remove temporary admin user generation workaround that shouldn't have…
Browse files Browse the repository at this point in the history
… been in there
  • Loading branch information
0xTim committed Feb 9, 2017
1 parent 941231e commit e046d4c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Sources/SteamPress/Controllers/BlogAdminController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -296,10 +296,9 @@ struct BlogAdminController {
let users = try BlogUser.all()
if users.count == 0 {
let password = String.random()
// WARNING TEMP TODO!
let creds = BlogUserCredentials(username: "admin", password: "password", name: "Admin")
let creds = BlogUserCredentials(username: "admin", password: password, name: "Admin")
if var user = try BlogUser.register(credentials: creds) as? BlogUser {
// user.resetPasswordRequired = true
user.resetPasswordRequired = true
try user.save()
print("An Admin user been created for you - the username is admin and the password is \(password)")
print("You will be asked to change your password once you have logged in, please do this immediately!")
Expand Down

0 comments on commit e046d4c

Please sign in to comment.