View | Details | Raw Unified | Return to bug 23816
Collapse All | Expand All

(-)a/Koha/Patron/Category.pm (-15 / +6 lines)
Lines 235-243 or, if undef, falls back to the OpacResetPassword system preference. Link Here
235
sub effective_reset_password {
235
sub effective_reset_password {
236
    my ($self) = @_;
236
    my ($self) = @_;
237
237
238
    return ( defined $self->reset_password )
238
    return $self->reset_password // C4::Context->preference('OpacResetPassword');
239
        ? $self->reset_password
240
        : C4::Context->preference('OpacResetPassword');
241
}
239
}
242
240
243
=head3 effective_change_password
241
=head3 effective_change_password
Lines 250-290 or, if undef, falls back to the OpacPasswordChange system preference. Link Here
250
sub effective_change_password {
248
sub effective_change_password {
251
    my ($self) = @_;
249
    my ($self) = @_;
252
250
253
    return ( defined $self->change_password )
251
    return $self->change_password // C4::Context->preference('OpacPasswordChange');
254
        ? $self->change_password
255
        : C4::Context->preference('OpacPasswordChange');
256
}
252
}
257
253
258
=head3 effective_min_password_length
254
=head3 effective_min_password_length
259
255
260
    $category->effective_min_password_length()
256
    $category->effective_min_password_length()
261
257
262
Retrieve category's password length if setted, or minPasswordLength otherwise
258
Retrieve category's password length if set, or minPasswordLength otherwise
263
259
264
=cut
260
=cut
265
261
266
sub effective_min_password_length {
262
sub effective_min_password_length {
267
    my ($self) = @_;
263
    my ($self) = @_;
268
264
269
    return C4::Context->preference('minPasswordLength') unless defined $self->min_password_length;
265
    return $self->min_password_length // C4::Context->preference('minPasswordLength');
270
271
    return $self->min_password_length;
272
}
266
}
273
267
274
=head3 effective_require_strong_password
268
=head3 effective_require_strong_password
275
269
276
    $category->effective_require_strong_password()
270
    $category->effective_require_strong_password()
277
271
278
Retrieve category's password strength if setted, or RequireStrongPassword otherwise
272
Retrieve category's password strength if set, or RequireStrongPassword otherwise
279
273
280
=cut
274
=cut
281
275
282
sub effective_require_strong_password {
276
sub effective_require_strong_password {
283
    my ($self) = @_;
277
    my ($self) = @_;
284
278
285
    return C4::Context->preference('RequireStrongPassword') unless defined $self->require_strong_password;
279
    return $self->require_strong_password // C4::Context->preference('RequireStrongPassword');
286
287
    return $self->require_strong_password;
288
}
280
}
289
281
290
=head3 override_hidden_items
282
=head3 override_hidden_items
291
- 

Return to bug 23816