Agreed with Brion here. The User class has a large mixture of functionality and is hardcoded all over the place. There are very few use cases I can think of where it would work, and even then there's no guarantee the solution will continue to work in future versions.
-- Tyler Romeo On Oct 27, 2013 4:47 PM, "Brion Vibber" <[email protected]> wrote: > Generally I would not recommend subclassing User; while you can certainly > create such a subclass it will have limited utility as you can't really > control how they get created easily. > > Like the rest of MediaWiki, the User class is intended to be customized > through extension hooks... What sort of behavior customization are you > thinking of doing? > > -- brion > > > On Sun, Oct 27, 2013 at 1:34 PM, Marcin Cieslak <[email protected]> wrote: > > > Hi, > > > > given that there are some extensions which perform edits/actions > > automatically (not directly as a result of user request), > > > > I was wondering, was anyone attempting or successful at subclassing > > "User"? > > > > There are some places where name of this class is hardcoded. > > > > //Saper > > > > > > _______________________________________________ > > Wikitech-l mailing list > > [email protected] > > https://lists.wikimedia.org/mailman/listinfo/wikitech-l > _______________________________________________ > Wikitech-l mailing list > [email protected] > https://lists.wikimedia.org/mailman/listinfo/wikitech-l _______________________________________________ Wikitech-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikitech-l
