Skip to content

Commit

Permalink
fix scrutinizer err1
Browse files Browse the repository at this point in the history
  • Loading branch information
TonisOrmisson committed Jan 3, 2018
1 parent 7eede77 commit b8ba39f
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions application/commands/ImportCommand.php
Expand Up @@ -56,12 +56,6 @@ public function actionIndex($file,$userId=null)

if($userId){
$user = User::model()->findByPk($userId);
if(!$user){
echo 'Fatal error: User not found'.PHP_EOL;
echo 'Specify the user id by --userId=[uid] or leave blank to use a default superadmin.'.PHP_EOL;
exit(1);

}
}else{
echo 'No user is set'.PHP_EOL;
$superAdmins = User::getSuperAdmins();
Expand All @@ -70,6 +64,11 @@ public function actionIndex($file,$userId=null)
echo sprintf('Using user %s (userId=%d) by default',$user->users_name, $user->primaryKey).PHP_EOL;
}
}
if(!$user){
echo 'Fatal error: User not found'.PHP_EOL;
echo 'Specify the user id by --userId=[uid] or leave blank to use a default superadmin.'.PHP_EOL;
exit(1);
}



Expand Down

0 comments on commit b8ba39f

Please sign in to comment.