Skip to content

Commit c6c3458

Browse files
committed
user_sql-78 Hide "password change form"
Hide "password change form" when "Allow password change" not set
1 parent 4be9acb commit c6c3458

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

lib/Backend/UserBackend.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121

2222
namespace OCA\UserSQL\Backend;
2323

24+
use OC\User\Backend;
2425
use OCA\UserSQL\Action\EmailSync;
2526
use OCA\UserSQL\Action\IUserAction;
2627
use OCA\UserSQL\Action\QuotaSync;
@@ -642,4 +643,16 @@ public function deleteUser($uid)
642643
{
643644
return false;
644645
}
646+
647+
/**
648+
* @inheritdoc
649+
*/
650+
public function implementsActions($actions): bool
651+
{
652+
if ($actions & Backend::SET_PASSWORD) {
653+
return !empty($this->properties[Opt::PASSWORD_CHANGE]);
654+
}
655+
656+
return parent::implementsActions($actions);
657+
}
645658
}

0 commit comments

Comments
 (0)