When a user registers but never logs in, no IP is registered. Adding the following code to uiplog.module fixes this.

function uiplog_user_insert(&$edit, $account, $category) {
  global $user;

  // Do not log an address when the user is created by someone else.
  if ($user->uid != 0) {
    return;
  }

  uiplog_user_login($edit, $account);
}

Comments

jvdurme’s picture

Hi Jorrit,

do you have code to do this for the 6.x version?
Would really help me. I'm having spam trubbles..

Joost

jvdurme’s picture

It's ok, I found it.

Changed:

if (($op == 'login') {

to

if (($op == 'login') or ($op == 'insert')){

Jorrit’s picture

Great, I don't use this module on Drupal 6.

petednz’s picture

Sounds like this module could be what we want to try out - if it has the above patch.

Is this patch going to be committed?

Our goal is to have the IP address of spammers as they register for an account.

sivaji_ganesh_jojodae’s picture

Version: 7.x-1.0-beta2 » 7.x-1.x-dev
Status: Active » Fixed

Added this feature to both 6.x and 7.x branches, download the dev release to avail this feature.

Jorrit’s picture

Thanks for committing. Are you planning on making a new release?

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.