You are here

function user_relationship_migrate_pending in User Relationships 6

Migrate pending relationships.

1 call to user_relationship_migrate_pending()
user_relationship_migrate_form_submit in user_relationship_migrate/user_relationship_migrate.module
Process migrate relationship form submission.

File

user_relationship_migrate/user_relationship_migrate.mysql.inc, line 9
MySQL implementation of Buddylist2->UR migration

Code

function user_relationship_migrate_pending($rtid) {
  db_query('LOCK TABLE {user_relationships} WRITE, {buddylist_pending_requests} READ');
  db_query("INSERT INTO {user_relationships} (requester_id, requestee_id, rtid, approved, created_at)\n     SELECT requester_uid, requestee_uid, %d, 0, %d FROM {buddylist_pending_requests}", $rtid, time());
  db_query('UNLOCK TABLES');
  return TRUE;
}