title: Grails Spring Security UI MySQL all users disabled?
body: <p>I am using Grails 2.1.1 with Spring Security 1.2.7.1 and Spring Security UI 0.2.</p>
  
  <p>When I create some test users in BootStrap.groovy using an in memory database I am able to log in and manage users--everything works fine. However, when I switch my data source to a MySQL database, the service states that the user account is disabled when I try to log in. I have checked and the password appears to be hashing correctly (i.e., it matches what's in the database). The only modification I made to a user is to include a Study ID. In attempting to debug the code I've found that org.codehaus.groovy.grails.plugins.springsecurity.GrailsUser indicates enabled=false. </p>
  
  <p>Any help is greatly appreciated!</p>
  
  <p>My DataSource:</p>
  
  <pre><code>    dataSource {
          driverClassName = "com.mysql.jdbc.Driver"
          dialect = org.hibernate.dialect.MySQL5InnoDBDialect
          url = "jdbc:mysql://localhost/users"
          username = "root"
          password = ""
          dbCreate = "create-drop" 
      }
  </code></pre>
  
  <p>My BootStrap.groovy code:</p>
  
  <pre><code>    def adminRole = new Role(authority: 'ROLE_ADMIN').save(flush: true)
      def userRole = new Role(authority: 'ROLE_USER').save(flush: true)
  
      def testAdmin = new User(username: 'me', enabled: true, password: 'password', studyID: '0')
      testAdmin.save(flush: true)
      UserRole.create testAdmin, adminRole, true
  
      def testUser = new User(username: '100', enabled: true, password: 'test', studyID: '101')
      testUser.save(flush: true)
      UserRole.create testUser, userRole, true
  
      assert User.count() == 2
      assert Role.count() == 2
      assert UserRole.count() == 2
  </code></pre>
  
  <p>A row from my User.user table after starting the application. No matter how I change these values, login attempts state that the user is disabled:</p>
  
  <pre><code>id  version account_expired account_locked  enabled password    password_expired    studyid username
          1   0   1   1   1   5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a...   1   0   me
  </code></pre>