Skip to content

Commit

Permalink
Added validation to generate_user to make sure it runs after plugins_…
Browse files Browse the repository at this point in the history
…loaded

Fixes #1
  • Loading branch information
MZAWeb committed Dec 13, 2012
1 parent cd35b1e commit 743333a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions generate_dummy_data.php
Expand Up @@ -21,6 +21,10 @@ public function __construct() {

public function generate_user() {

if ( !function_exists( 'wp_hash_password' ) ) {
_doing_it_wrong( 'bbpFauxData->generate_user()', "This function should be called after plugins_loaded", '0.1' );
return false;
}

$first = $this->faker->firstName;
$last = $this->faker->lastName;
Expand Down

0 comments on commit 743333a

Please sign in to comment.