Skip to content

My cheesy Scuttle hack

I’ve had some requests for my admin_delete_users_bookmarks_and_tags for Scuttle that I hobbled together some time ago. After going through all the files in my scuttle installation, I realized the only hack was that I changed the function isAdmin in the services/userservice.php from this:

function isAdmin($userid) {
return false; //not implemented yet
}
to this:

function isAdmin($userid) {
if ( ($userinfo = $this->getUser($userid)) ) {
if ( $userinfo['uAdmin'] == 1 ) {
return true;
}
}
return false;
}

This a really cheap and dirty hack because all it does is give admin privileges to the user with userid 1 in the database (which just happens to be my userid – substitute your own). All the other code was Scuttle 0.7.1 already, just waiting to be used. I don’t even know if this is a hack – more like a piece of duct tape over a leak in the hull of a boat. But it works. If anyone has a better hack, and honestly – a monkey sitting banging his/her head on the keyboard could do better than this – please leave it here or let me know.

UPDATE: Sadly, the spammers figured out a way around this, and even after shutting down registration the bad links kept showing up. The school’s social bookmarking site has been shut down indefinitely. Stinking spammers!

One Trackback/Pingback

  1. [...] It’s a great feeling when something you’ve done is so interesting to spammers, that they contact you personally. I received a comment to moderate in my e-mail this morning from Roger (I’m not giving a last name, and I’m definitely not going to put an URL up here) asking about my scuttle spam-proofing hack. Here’s the comment that Roger tried to leave: I tried this with one of my scuttle sites, and I don’t see any difference. I must be doing somthing wrong. After I made the change what should I see when I log in as user with id 1? I checked sc_users and the Id I am using to log in is the user ID 1. Plus if you can help me limit the max tags per post. I am getting spammed to death… [...]

Post a Comment

Your email is never published nor shared. Required fields are marked *
*
*