Skip to content

Commit

Permalink
Fix profile page (#115)
Browse files Browse the repository at this point in the history
* add useful comment for developers
* allow to change only name, login and password in profile page
  • Loading branch information
DarkSide666 authored Apr 6, 2024
1 parent 24f3b51 commit a5987eb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions demos/_includes/App.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ public function init(): void

$this->initAuth(false);

// Uncomment this line to enable ACL in demo app.
// We do not enable it in demo app by default to allow not logged in users to generate demo DB first.
// $this->initAcl();

if ($this->auth->isLoggedIn()) {
$this->auth->addUserMenu();
}
Expand Down
2 changes: 1 addition & 1 deletion src/Auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ public function setPreferencePage(VirtualPage $page): void
{
$f = Form::addTo($page);
$f->addHeader(['User Preferences', 'subHeader' => $this->user->getTitle(), 'icon' => 'user']);
$f->setModel($this->user);
$f->setModel($this->user, ['name', 'email', 'password']);
$f->onSubmit(static function (Form $f) {
$f->entity->save();

Expand Down

0 comments on commit a5987eb

Please sign in to comment.