You are here

function invite_update_4 in Invite 5.2

Same name and namespace in other branches
  1. 5 invite.install \invite_update_4()

Add notification after an invited user registers.

File

./invite.install, line 180
Installation file for invite module.

Code

function invite_update_4() {
  $ret = array();
  switch ($GLOBALS['db_type']) {
    case 'mysql':
    case 'mysqli':
      $ret[] = update_sql("ALTER TABLE {invite} CHANGE received received tinyint(3) unsigned NOT NULL default '0'");
      break;
    case 'pgsql':
      db_change_column($ret, 'invite', 'received', 'received', 'SMALLINT', array(
        'not null' => TRUE,
      ));
      break;
  }

  // Prevent displaying a whole bunch of messages for old invites
  $ret[] = update_sql("UPDATE {invite} SET received = 1 WHERE mid <> 0");
  return $ret;
}