codebunch /
silverstripe-user-management
| 1 | <?php |
||
| 2 | namespace UserManagement\Page; |
||
| 3 | |||
| 4 | use PageController; |
||
|
0 ignored issues
–
show
|
|||
| 5 | use SilverStripe\Security\Member; |
||
| 6 | use SilverStripe\Security\Security; |
||
| 7 | use UserManagement\Forms\ProfileForm; |
||
| 8 | use SilverStripe\SiteConfig\SiteConfig; |
||
| 9 | |||
| 10 | /** |
||
| 11 | * Class UserProfilePageController |
||
| 12 | * |
||
| 13 | * @package user-management |
||
| 14 | */ |
||
| 15 | class UserProfilePageController extends PageController |
||
| 16 | { |
||
| 17 | /** |
||
| 18 | * @var string |
||
| 19 | */ |
||
| 20 | private static $url_segment = 'my-profile'; |
||
|
0 ignored issues
–
show
|
|||
| 21 | |||
| 22 | /** |
||
| 23 | * @var array |
||
| 24 | */ |
||
| 25 | private static $allowed_actions = array('ProfileForm'); |
||
|
0 ignored issues
–
show
|
|||
| 26 | |||
| 27 | /** |
||
| 28 | * @var mixed |
||
| 29 | */ |
||
| 30 | private $member = false; |
||
| 31 | |||
| 32 | 2 | public function init() |
|
| 33 | { |
||
| 34 | 2 | parent::init(); |
|
| 35 | |||
| 36 | 2 | $this->member = Security::getCurrentUser(); |
|
| 37 | } |
||
| 38 | |||
| 39 | /** |
||
| 40 | * Returns the profile form |
||
| 41 | * @return \UserManagement\Forms\ProfileForm |
||
| 42 | */ |
||
| 43 | 2 | public function ProfileForm() |
|
| 44 | { |
||
| 45 | |||
| 46 | 2 | $form = new ProfileForm($this, 'ProfileForm'); |
|
| 47 | 2 | $form->loadDataFrom($this->member); |
|
| 48 | 2 | return $form; |
|
| 49 | } |
||
| 50 | } |
||
| 51 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths