Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Extended Auth_User not found
  • Hello,

    I'm trying to extend the Auth_User class. In order to do so, I've created app\classes\model\user.php:

    namespace Model;
    class Auth_User extends \Auth\Model\Auth_User
    {    
    protected static $_properties = array(
    'telefon_number'        => array(
    'label'  => 'auth_model_user.telefon_number',
    'default'  => 0,
    'null'  => false,
    ),
    );
    }

    In my app\bootstrap.php I have:

    Autoloader::add_classes(array(
    'Model\\Auth_User' => APPPATH.'classes/model/user.php',
    'Auth_User' => APPPATH.'classes/model/user.php',
    ));

    However, I get a "File "APPPATH/classes/model/user.php" does not contain class "Auth_User"" exception. What could have gone wrong?
     
  • HarroHarro
    Accepted Answer
    You get that message because it doesn't. It contains \Model\Auth_User.

    So why add it to the autoloader twice, once correct and once incorrect?
  • Thank you, it works now. 

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion