Development

#3506 ([PATCH]: sfGuardDoctrinePlugin/trunk: unique constraint on algorithm instead of username)

You must first sign up to be able to contribute.

Ticket #3506 (new defect)

Opened 1 week ago

[PATCH]: sfGuardDoctrinePlugin/trunk: unique constraint on algorithm instead of username

Reported by: thomas.s Assigned to: pookey
Priority: minor Milestone:
Component: sfGuardDoctrinePlugin Version: 1.1.0 RC1
Keywords: schema unique Cc:
Qualification: Unreviewed

Description

The unique constraint is on the algorithm column, should be on username:

is

sfGuardUser:
  actAs: [Timestampable]
  columns:
    id:
      type: integer(4)
      primary: true
      autoincrement: true
    username: string(128)
    algorithm:
      type: string(128)
      unique: true
    salt: string(128)
    password: string(128)
    is_active:
      type: boolean
      default: 1
    is_super_admin:
      type: boolean
      default: 0
    last_login:
      type: timestamp

should be:

columns:
    id:
      type: integer(4)
      primary: true
      autoincrement: true
    username:
      type: string(128)
      unique: true
    algorithm:
      type: string(128)
      default: sha1
    salt: string(128)
    password: string(128)
    is_active:
      type: boolean
      default: 1
    is_super_admin:
      type: boolean
      default: 0
    last_login:
      type: timestamp