| Conditions | 6 |
| Paths | 1 |
| Total Lines | 12 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 42 |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 29 | public function handle() |
||
| 30 | { |
||
| 31 | app('router')->matched(function (RouteMatched $event) { |
||
|
|
|||
| 32 | if (!$this->isAdminArea($event)) { |
||
| 33 | return false; |
||
| 34 | } |
||
| 35 | |||
| 36 | if ($manage = $this->config->get('administrator.manage_passwords')) { |
||
| 37 | if ($model = $this->fetchModel($this->config)) { |
||
| 38 | $model::saving(function ($user) { |
||
| 39 | if (!empty($user->password) && $user->isDirty('password')) { |
||
| 40 | $user->password = bcrypt($user->password); |
||
| 41 | } |
||
| 64 |