Project

General

Profile

AuthWidget Private Member Promotion

Added by Josh Lampco about 10 years ago

I was working on customizing the login view of the AuthWidget. I inherited from AuthWidget and I see that the creation of the login view is split into two function calls - AuthWidget::createPasswordLoginView() and AuthWidget::createLoginView(). I have chosen to reimplement AuthWidget::createLoginView(), however, I will be keeping most of the functionality of AuthWidget::updatePasswordLoginView(). Would it make more sense to promote the registrationEnabled_ member to protected or add an accessor to the library? Without this, I am unable to check if registration is enabled.


Replies (1)

RE: AuthWidget Private Member Promotion - Added by Josh Lampco about 10 years ago

Trying to reimplement the member RegistrationModel::validateField(Field field) turns up the same kind of situation as before where private members keep me from adding full functionality to my reimplemented method. Most notable, the member existingUser_ is private with no accessor.

    (1-1/1)