Skip to content
This repository has been archived by the owner on Mar 12, 2024. It is now read-only.

Commit

Permalink
fixed admin user setup, updated deps
Browse files Browse the repository at this point in the history
  • Loading branch information
schmunk42 committed Jan 6, 2015
1 parent cdd62b0 commit 9d104a7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions commands/AppController.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

namespace app\commands;

use dektrium\user\Finder;
use dektrium\user\ModelManager;
use dmstr\console\controllers\BaseAppController;
use mikehaertl\shellcommand\Command;
Expand Down Expand Up @@ -215,8 +216,8 @@ public function actionSetupDocs()
*/
public function actionSetupAdminUser()
{
$mgr = new ModelManager;
$admin = $mgr->findUserByUsername('admin');
$finder = \Yii::$container->get(Finder::className());
$admin = $finder->findUserByUsername('admin');
if ($admin === null) {
$email = $this->prompt(
'E-Mail for application admin user:',
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"yiisoft/yii2": "2.0.*",
"yiisoft/yii2-bootstrap": "2.*",
"yiisoft/yii2-swiftmailer": "2.*",
"dektrium/yii2-user": "*",
"dektrium/yii2-user": "0.9.*",
"mikehaertl/php-shellcommand": "1.*",
"dmstr/yii2-app-command": "dev-master",
"dmstr/yii2-migrate-command": "*",
Expand Down
3 changes: 2 additions & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 9d104a7

Please sign in to comment.