Adding Users to Bootstrap.groovy


/ Published in: Groovy
Save to your folder(s)



Copy this code and paste it in your HTML
  1. //Adding Users
  2. def userGod = new User( username:'god',
  3. userRealName:'god almighty',
  4. enabled: true,
  5. emailShow: true,
  6. email: 'god@grailsapp.com',
  7. passwd: authenticateService.encodePassword('god')).save()
  8.  
  9. def userSlave = new User(username:'slave',
  10. userRealName:'poor slave',
  11. enabled: true,
  12. emailShow: true,
  13. email: 'slave@grailsapp.com',
  14. passwd: authenticateService.encodePassword('slave')).save()

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.