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") ? 
  
".XOOPS_UPLOAD_URL."/".$foundusers[$j]->getVar("user_avatar")."' alt='' />" " ";
  
$fuser_name $foundusers[$j]->getVar("uname") ? $foundusers[$j]->getVar("uname") : " ";

  echo 
"$class'>  value='".$foundusers[$j]->getVar("uid")."' />  name='memberslist_uname[".$foundusers[$j]->getVar("uid")."]' id='memberslist_uname[]'
  value='"
.$foundusers[$j]->getVar("uname")."' />";
  echo 
"$fuser_avatar";

  
/*
    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 
".XOOPS_URL."/userinfo.php?uid=".
    
$foundusers[$j]->getVar("uid")."'>".$foundusers[$j]->getVar("uname")."";
  }
  else 
//If the user is inactive
  
{
    
$uid $foundusers[$j]->getVar("uid");
    
$uname $foundusers[$j]->getVar("uname");
    echo 
"
           .XOOPS_URL."/modules/profile/admin/user.php?op=editordelete&id=$uid
             
$uname (inactive) 
           
          "
;
  }

  echo 
"".$fuser_name.".$foundusers[$j]->getVar("email").
       
"'>.XOOPS_URL."/images/icons/email.gif' border='0' alt='";
  
printf(_SENDEMAILTO,$foundusers[$j]->getVar("uname""E"));
  echo 
"' />".formatTimeStamp($foundusers[$j]->getVar("user_regdate"),"s").
       
"";
  if ( 
$foundusers[$j]->getVar("last_login") != ) {
    echo 
formatTimeStamp($foundusers[$j]->getVar("last_login"),"m");
  } else {
    echo 
" ";
  }
  echo 
"".$foundusers[$j]->getVar("posts")."";
  echo 
"n";
}

Login

Who's Online

408 user(s) are online (317 user(s) are browsing Support Forums)


Members: 0


Guests: 408


more...

Donat-O-Meter

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

Latest GitHub Commits