1
Twiggy
Inactive accounts with extended profiles enabled.
  • 2006/2/26 6:56

  • Twiggy

  • Just popping in

  • Posts: 1

  • Since: 2006/2/26


I found it useful to modify the /modules/system/admin/findusers/main.php slightly so that if an account is inactive it is tagged (inactive) and the link goes to the extended profiles module in edit mode for that user. I wanted a way to find all the inactive accounts and be able to edit them by clicking on their name. So until I write a custom block I have the following code modification for the foreach loop beginning at line 289. This is for XOOPS version 2.2.3 final. Hopefully someone will find it useful.

foreach (array_keys($foundusers) as $j) {
  if (
$ucount == 0) {
    
$class 'even';
  } else {
  
$class 'odd';
  }
  
$ucount++;
  
$fuser_avatar $foundusers[$j]->getVar("user_avatar") ? 
  
"<img src='".XOOPS_UPLOAD_URL."/".$foundusers[$j]->getVar("user_avatar")."' alt='' />" "&nbsp;";
  
$fuser_name $foundusers[$j]->getVar("uname") ? $foundusers[$j]->getVar("uname") : "&nbsp;";

  echo 
"<tr class='$class'><td align='center'><input type='checkbox' name='memberslist_id[]' id='memberslist_id[]'
  value='"
.$foundusers[$j]->getVar("uid")."' /><input type='hidden'
  name='memberslist_uname["
.$foundusers[$j]->getVar("uid")."]' id='memberslist_uname[]'
  value='"
.$foundusers[$j]->getVar("uname")."' /></td>";
  echo 
"<td>$fuser_avatar</td>";

  
/*
    This is a slightly modified code that allows the admin to click on an
    inactive user and go directly to their account in edit mode.

    Note:
    Inactive accounts are tagged denoted (inactive) after their name
  */

  //If the user is active
  
if( $level $foundusers[$j]->level() > )
  {
    echo 
"<td><a href='".XOOPS_URL."/userinfo.php?uid=".
    
$foundusers[$j]->getVar("uid")."'>".$foundusers[$j]->getVar("uname")."</a></td>";
  }
  else 
//If the user is inactive
  
{
    
$uid $foundusers[$j]->getVar("uid");
    
$uname $foundusers[$j]->getVar("uname");
    echo 
"<td>
           <a href="
.XOOPS_URL."/modules/profile/admin/user.php?op=editordelete&id=$uid
             
$uname (inactive) 
           </a>
          </td>"
;
  }

  echo 
"<td>".$fuser_name."</td><td align='center'><a href='mailto:".$foundusers[$j]->getVar("email").
       
"'><img src='".XOOPS_URL."/images/icons/email.gif' border='0' alt='";
  
printf(_SENDEMAILTO,$foundusers[$j]->getVar("uname""E"));
  echo 
"' /></a></td><td align='center'>".formatTimeStamp($foundusers[$j]->getVar("user_regdate"),"s").
       
"</td><td align='center'>";
  if ( 
$foundusers[$j]->getVar("last_login") != ) {
    echo 
formatTimeStamp($foundusers[$j]->getVar("last_login"),"m");
  } else {
    echo 
"&nbsp;";
  }
  echo 
"</td><td align='center'>".$foundusers[$j]->getVar("posts")."</td>";
  echo 
"</tr>n";
}

Login

Who's Online

221 user(s) are online (119 user(s) are browsing Support Forums)


Members: 0


Guests: 221


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits