If you are using community builder login module on Joomla and If you want to record the IP addresses of the registered users when they are logging in to the site you can do it by making some modifications on cblogin module.. Follow these steps to do it..

In my case I am using phpmyadmin and my platform is Linux Ubuntu 10.04
And also I am using Joomla 1.5.20 and Community Builder 1.2.1
   
1. Goto your database and insert one column to the jos_users
    1->1 select jos_users table on your database

    1->2 select Structure

    1->3 add 1 field as the screen-shot given below.

  
    1->4 Fill the fields like this


    1->5 Then click on "save"

2. Open the mod_cblogin.php file on the Joomla file system

    2->1 goto /modules/mod_cblogin/


    2->2 open mod_cblogin.php file with a text-editor

3. Insert some code to record the IP addresses on the table

    3->1 goto the bottom of the code file

    3->2 Insert the code given below..
   

 $ip = getenv("REMOTE_ADDR") ;  
    $idd = $_CB_framework->myId(); 
    if($idd!=0){ 
    $db = JFactory::getDBO(); 
    mysql_query("UPDATE jos_users SET ip = '$ip' WHERE id = '$idd'"); 
    



    3->3 Save file and exit

4. Now Open the admin.comprofiler.html.php file on the Joomla administrator file system

    4->1 goto /administrator/components/com_comprofiler/


    4->2 open admin.comprofiler.html.php file with a text-editor

    4->3 Search for the "Last Visit" on the file



    4->4 Then Insert the following highlighted codes on adminlist table as the screen-shots given below..
   



    <table cellpadding="4" cellspacing="0" border="0" width="100%" class="adminlist">
    <thead>
    <tr>
          <th align="center" colspan="<?php echo $colspans; ?>"> <?php echo $pageNav->writePagesLinks(); ?></th>
        </tr>
        <tr>
          <th width="1%" class="title">#</th>
          <th width="3%" class="title"> <input type="checkbox" name="toggle" value="" <?php echo 'onClick="checkAll(' . count($rows) . ');"'; ?> />
          </th>
          <th width="15%" class="title">Name</th>
          <th width="10%" class="title">UserName</th>
          <th width="5%" class="title" nowrap="nowrap">Logged In</th>
    <?php
        foreach ( $pluginColumns as $name => $content ) {
    ?>
    <th width="15%" class="title"><?php echo $name; ?></th>
 
    <?php
        }
    ?>
          <th width="15%" class="title">Group</th>
          <th width="15%" class="title">E-Mail</th>
          <th width="10%" class="title">Registered</th>
          <th width="10%" class="title" nowrap="nowrap">Last Visit</th>
          <th width="5%" class="title">Enabled</th>
          <th width="5%" class="title">Confirmed</th>
          <th width="5%" class="title">Approved</th>
          <!--start first additional code by GJ-->
          <th width="25%" class="title">IP</th>
          <!--start first additional code by GJ-->
          <th width="1%" class="title">ID</th>
        </tr>
       </thead>
       <tbody>
    <?php
        $k = 0;
        $imgpath='../components/com_comprofiler/images/';
        for ($i=0, $n=count( $rows ); $i < $n; $i++) {
            $row =& $rows[$i];
            $img = $row->block ? 'publish_x.png' : 'tick.png';
            $task = $row->block ? 'unblock' : 'block';
            $hover1 = $row->block ? 'Blocked' : 'Enabled';
             
            switch ($row->approved) {
                case 0:
                    $img2 = 'pending.png';
                    $task2 = 'approve';
                    $hover = 'Pending Approval';
                break;
                case 1:
                    $img2 = 'tick.png';
                    $task2 = 'reject';
                    $hover = 'Approved';
                break;                 
                case 2:
                    $img2 = 'publish_x.png';
                    $task2 = 'approve';
                    $hover = 'Rejected';
                break;                 
 
            }
 
                $img3 = $row->confirmed ?  'tick.png' : 'publish_x.png';
                // $task3 = $row->confirmed ?   'reject' : 'approve';
                $hover3 = $row->confirmed ?   'confirmed' : 'unconfirmed';
 
    ?>
        <tr class="<?php echo "row$k"; ?>">
          <td><?php echo $i+1+$pageNav->limitstart;?></td>
          <td><input type="checkbox" id="cb<?php echo $i;?>" name="cid[]" value="<?php echo $row->id; ?>" onClick="isChecked(this.checked);" /></td>
          <td> <a href="#edit" onClick="return listItemTask('cb<?php echo $i;?>','edit')">
        <?php echo $row->name; ?> </a> </td>
          <td><?php echo $row->username; ?></td>
          <td align="center"><?php echo $row->loggedin ? '<img src="' . $imgpath . 'tick.png" width="16" height="16" border="0" alt="" />': ''; ?></td>
    <?php
        foreach ( $pluginColumns as $name => $content ) {
    ?>
    <td><?php echo $content[$row->id]; ?></td>
 
    <?php
        }
    ?>
          <td><?php echo $row->groupname; ?></td>
          <td><a href="mailto:<?php echo htmlspecialchars( $row->email ); ?>"><?php echo htmlspecialchars( $row->email ); ?></a></td>
          <td><?php echo cbFormatDate( $row->registerDate ); ?></td>
          <td><?php echo cbFormatDate( $row->lastvisitDate ); ?></td>
          <td width="10%"><a href="javascript: void(0);" onClick="return listItemTask('cb<?php echo $i;?>','<?php echo $task;?>')"><img src="<?php echo $imgpath.$img;?>" width="16" height="16" border="0" title="<?php echo $hover1; ?>" alt="<?php echo $hover1; ?>" /></a></td>
          <td width="10%"><img src="<?php echo $imgpath.$img3;?>" width="16" height="16" border="0" title="<?php echo $hover3; ?>" alt="<?php echo $hover3; ?>" /></td>
          <td width="10%"><a href="javascript: void(0);" onClick="return listItemTask('cb<?php echo $i;?>','<?php echo $task2;?>')"><img src="<?php echo $imgpath.$img2;?>" width="16" height="16" border="0" title="<?php echo $hover; ?>" alt="<?php echo $hover; ?>" /></a></td>
          <!--start second additional code by GJ-->                         
          <td style="text-align:right"><?php echo $row->ip;?></td>
          <!--end second additional code by GJ -->                        
     <td><?php echo $row->id; ?></td>
        </tr>
        <?php $k = 1 - $k;
        }
        ?>
       </tbody>
       <tfoot>
        <tr>
          <th align="center" colspan="<?php echo $colspans; ?>"> <?php echo $pageNav->getListFooter(); ?></th>
        </tr>
       </tfoot>
      </table>

    4->5
Save file and exit

5. Now you can see the IP addresses of users on the CB User Manager in Back end

    5->1 login to backend

    5->2 goto Components -> Community Builder -> User Management


    5->3 then you can see the ip addresses on the list


The End...