Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
188 additions
and
1,026 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?php | ||
|
||
class DevController extends CController { | ||
|
||
public function actionIndex() { | ||
$result = ""; | ||
$dir = __DIR__ . '/../../plugins'; | ||
|
||
$result .= print_r(App()->pluginManager->scanPlugins(), true); | ||
|
||
// $plugins = \ls\pluginmanager\PluginConfig::findAll(true); | ||
|
||
// App()->pluginManager->subscribe("test", function($event) { var_dump($event); }); | ||
|
||
$this->renderText('<pre>' . $result . '</pre>'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?php | ||
use ls\pluginmanager\PluginEvent; | ||
class UsersController extends LSYii_Controller | ||
{ | ||
|
||
public $layout = 'minimal'; | ||
|
||
|
||
public function accessRules() | ||
{ | ||
// Note the order; rules are numerically indexed and we want to | ||
// parents rules to be executed only if ours dont apply. | ||
return array_merge([ | ||
['allow' ,'actions' => 'login'], | ||
['allow' , 'actions' => 'logout', 'users' => '@'], | ||
], parent::accessRules()); | ||
} | ||
|
||
public function actionLogin() { | ||
// Get all active auth plugins. | ||
$event = new PluginEvent('newLoginForm'); | ||
$event->dispatch(); | ||
$loginForms = $event->get('forms'); | ||
return $this->render('login', ['loginForms' => $loginForms]); | ||
} | ||
|
||
} | ||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<?php | ||
Yii::import('application.helpers.Hash', true); | ||
use Cake\Utility\Hash; | ||
|
||
class LSWebUser extends CWebUser | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,8 @@ | |
}, | ||
"events" : [ | ||
"beforeLogin", | ||
"newUserSession" | ||
"newUserSession", | ||
"newLoginForm" | ||
], | ||
"apiVersion" : "1.0" | ||
} |
Oops, something went wrong.