TIP: Use Markdown or, <pre> for multi line code blocks / <code> for inline code.
These forums are read-only and for archival purposes only!
Please join our new forums at discourse.kohanaframework.org
Invalid method unique_key called in Model_User
  • I'm getting this error:
    Invalid method unique_key called in Model_User
    when trying to log in with the auth module. My user model extends Model_Auth_User.

    On line 224 of Kohana_Auth, the method unique_key is called. This is what's causing me the error.

    Anyone have a similar problem?
  • 1. kohana core re-downloaded.
    2. application folder changed.
    3. no error message
  • I have the same error! Kohana core re-downloading and application folder changing didn't helped me. Can someone help me?
  • Lets start at the beginning. What version of Kohana are you using? unique_key was removed in later releases.

  • I'm using 3.0.7 - lastest version downloaded from http://kohanaframework.org/. The core that I re-downloaded is from http://github.com/.
  • Hello, I am using Kohana 3.0. My Model_Auth_User extends ORM and the Model_User extends Model_Auth_User. What I did, I copy the unique_key() function found in the Kohana documentation to the Model_Auth_User. public function unique_key($value) { return Validate::email($value) ? 'email' : 'username'; }

    Then I am able to run my app without the Error been displayed.

    I hope this will be usefull.

Howdy, Stranger!

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

In this Discussion