contao/import — Issue #2969: Frontenduser cannot be correctly extended due to getInstance bug
Author: importer
Created: 2011-11-29 20:37:21+00:00
State: open
Labels: Feature, frontend

The Frontenduser class cannot be correctly extended due to a bug in the implementation of getInstance method.

Current method line 173
`self::$objInstance = new FrontendUser();`

Corrected
`self::$objInstance = new self();`

This allows the extended class to be instantiated as the singleton, rather than FrontendUser class

when using `->import('Frontenduser', 'User')` or `->import('myextendedFrontenduser')`

The extended class is not correctly initialised by the framework without this method being changed.

For full conversation about why I think this is an error see the forum post here: [http://www.contao-community.org/viewtopic.php?f=9&t=2899]

--- _Originally created by wal5hy on March 30th, 2011, at 01:04am (ID 2969)_