CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Drupal Modules (Moderator: Donald Lobo) »
  • Integrity constraint violation
Pages: [1]

Author Topic: Integrity constraint violation  (Read 1393 times)

roswell2011

  • I’m new here
  • *
  • Posts: 28
  • Karma: 0
  • CiviCRM version: 4.0.4
  • CMS version: Drupal 7
  • MySQL version: 5
  • PHP version: php 5.3
Integrity constraint violation
December 16, 2011, 12:59:09 pm
Hello All,

I have been trying to auto approve registration from Drupal 7 using the Rules module. The registration process requires approval from admin by default. I have added a rule to the new user create 1. unblock the account 2. add roles to the account for certain domains (example.org).

When I try to register using the domain, I get the error below.

PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '152-5' for key 'PRIMARY': INSERT INTO {users_roles} (uid, rid) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1); Array ( [:db_insert_placeholder_0] => 152 [:db_insert_placeholder_1] => 5 ) in user_save() (line 579 of /var/www/mcua/htdocs/modules/user/user.module).

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Integrity constraint violation
December 20, 2011, 08:52:51 am
Looks like more of drupal / rule module related error and not CiviCRM. I would suggested posting this on drupal forums.

Hth
Kurund
Found this reply helpful? Support CiviCRM

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Drupal Modules (Moderator: Donald Lobo) »
  • Integrity constraint violation

This forum was archived on 2017-11-26.