issue#86 Problem with "Provide avatar" field with user_sql 4.2.1
This commit is contained in:
@@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
||||
### Added
|
||||
- Reverse active column option
|
||||
- Support for Nextcloud 16
|
||||
- Set default value for "provide avatar" option
|
||||
|
||||
## [4.2.1] - 2018-12-22
|
||||
### Fixed
|
||||
|
||||
@@ -49,6 +49,7 @@ Name | Description | Details
|
||||
--- | --- | ---
|
||||
**Allow display name change** | With this option enabled user can change its display name. The display name change is propagated to the database. | Optional.<br/>Default: false.<br/>Requires: user *Display name* column.
|
||||
**Allow password change** | Can user change its password. The password change is propagated to the database. See [Hash algorithms](#hash-algorithms). | Optional.<br/>Default: false.
|
||||
**Allow providing avatar** | Can user provide its avatar. The value is used when column *Provide avatar* is not set. | Optional.<br/>Default: false.
|
||||
**Case-insensitive username** | Whether user query should be case-sensitive or case-insensitive. | Optional.<br/>Default: false.
|
||||
**Reverse active column** | Reverse value of active column in user table. | Optional.<br/>Default: false.
|
||||
**Use cache** | Use database query results cache. The cache can be cleared any time with the *Clear cache* button click. | Optional.<br/>Default: false.
|
||||
|
||||
@@ -555,7 +555,7 @@ final class UserBackend extends ABackend implements
|
||||
);
|
||||
|
||||
if (empty($this->properties[DB::USER_AVATAR_COLUMN])) {
|
||||
return false;
|
||||
return !empty($this->properties[Opt::PROVIDE_AVATAR]);
|
||||
}
|
||||
|
||||
$user = $this->userRepository->findByUid($uid);
|
||||
|
||||
@@ -37,6 +37,7 @@ final class Opt
|
||||
const NAME_CHANGE = "opt.name_change";
|
||||
const PASSWORD_CHANGE = "opt.password_change";
|
||||
const PREPEND_SALT = "opt.prepend_salt";
|
||||
const PROVIDE_AVATAR = "opt.provide_avatar";
|
||||
const QUOTA_SYNC = "opt.quota_sync";
|
||||
const REVERSE_ACTIVE = "opt.reverse_active";
|
||||
const USE_CACHE = "opt.use_cache";
|
||||
|
||||
@@ -110,6 +110,7 @@ function print_select_options(
|
||||
<fieldset><?php
|
||||
print_checkbox_input($l, "opt-name_change", "Allow display name change", $_["opt.name_change"]);
|
||||
print_checkbox_input($l, "opt-password_change", "Allow password change", $_["opt.password_change"]);
|
||||
print_checkbox_input($l, "opt-provide_avatar", "Allow providing avatar", $_["opt.provide_avatar"]);
|
||||
print_checkbox_input($l, "opt-case_insensitive_username", "Case-insensitive username", $_["opt.case_insensitive_username"]);
|
||||
print_checkbox_input($l, "opt-reverse_active", "Reverse active column", $_["opt.reverse_active"]); ?>
|
||||
<div class="button-right"><?php
|
||||
|
||||
Reference in New Issue
Block a user