kieranbarnes Independent PHP, WordPress & CubeCart Programmer

[Snippet] Programmatically add a WordPress User

Posted on September 15, 2011

Posted by kieran

Here's how I would programmatically add a WordPress User

  1. require('../wp-blog-header.php');
  2.  
  3. $user_name ='kieran';
  4. $user_email = 'kieran@bl0ke.org';
  5.  
  6. $user_id = username_exists( $user_name );
  7. if ( !$user_id ) {
  8. $random_password = wp_generate_password( 12, false );
  9. $user_id = wp_create_user( $user_name, $random_password, $user_email );
  10. } else {
  11. $random_password = __('User already exists. Password inherited.');
  12. }
Tagged as: No Comments

Keeping an online reputation – Three

Posted on December 7, 2010

Posted by kieran

Don’t threaten a “google war” if you don’t get your way.

Thats all!

Filed under: Uncategorized No Comments

Keeping an online reputation – Two

Posted on December 6, 2010

Posted by kieran

Counter every negative comment with a positive outcome, or, ignore it; interacting with your community works great but you have to draw a line in hairy situations.

Thats all!

Filed under: Uncategorized No Comments

Keeping an online reputation – One

Posted on December 5, 2010

Posted by kieran

Never send threatening e-mails, posts or comments online; the Internet has a wonderful way of archiving rash comments you later regret.

Thats all!

Filed under: Uncategorized No Comments

I suck

Posted on November 29, 2010

Posted by kieran

Filed under: Uncategorized No Comments

SSH Security Ramblings

Posted on November 9, 2010

Posted by kieran

SSH - Secure Shell isn't that secure. If you're not using it behind a Layer 7 firewall or an enhanced security daemon like cPanel's cPHulk or even just the default config isn't secure.

What can you do?