Skip to content

Passing Auth::$instance() in Jelly_Auth model breaks meta table data #5

@j4jefferson

Description

@j4jefferson

I am setting up a site to use the Jelly-auth module, but am finding that using the default Model_Auth_User $meta->fields array does not work. It wipes out all meta field data and is caused by the password field having an Auth::instance() passed as the callback for the 'hash_with' option. I don't know why this is though. Below is how I have set up my scripts if that helps explain a little better.

I changed the Kohana Auth Config file to use 'jelly' as the driver: 'driver' => 'jelly', Then created a 'Auth_Jelly' file in the jelly-auth module, which extends 'Kohana_Auth_Jelly' file (a duplicate of the file driver from the original auth, so this to extends Auth). I have then changed the constructor function to get all users from the database:


parent::__construct($config);

// Load user list
$this->_users = Jelly::query('user')->select_column('username','password')->select();

} ```

However, when I run this I get and error in Firefox like this: Call to a member function trigger() on a non-object It highlights line 168 from MODPATH/jelly-orm/classes/jelly/core/builder.php

I have checked through the Model_Auth_User file and it seems that the password meta field is breaking the meta object through the line: `'hash_with' => array(Auth::instance(), 'hash')`, in the $meta->fields array. Essentially it returns an empty meta object to the query builder select_all function

I am trying to get to the bottom of why this is happening, because as far as I can see the callback is referencing a valid function (hash) from the Auth script, and the meta-fields for users are all fine.

Please accept apologies if this is not a real bug and I have set up my scripts incorrectly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions