Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. $usersave = array(
  2. 'name' => 'abc',
  3. 'pass' => 'abc',
  4. 'mail' => 'abc@gmail.com',
  5. 'status' => 1,
  6. 'roles' => array(
  7. DRUPAL_AUTHENTICATED_RID => 'authenticated user',
  8. 5 => 'customer'
  9. ),
  10. );
  11.  
  12. $save = user_save($usersave);
  13.  
  14. PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '0' for key 'PRIMARY': INSERT INTO {users} (name, pass, mail, status) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3); Array ( [:db_insert_placeholder_0] => abc [:db_insert_placeholder_1] => abc [:db_insert_placeholder_2] => abc@gmail.com [:db_insert_placeholder_3] => 1 ) in drupal_write_record() (line 7383 of /home/vijay/public_html/vssb/public/includes/common.inc).
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement