Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8785935
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T21:28:53+00:00 2026-06-13T21:28:53+00:00

New to kohana here. I have a task from my internship to make login

  • 0

New to kohana here. I have a task from my internship to make login system with kohana framework 3.2 . I also did it to insert,update and delete stuff with auto modeler ORM. I have some trouble now with kohana auth. I already have the database structure Imported and inserted an user in the ‘users’ table and give him a role in the ‘roles_user’ table.

Also created an Auth.php file in APP/config/ :

return array(

    'driver'       => 'AutoModeler_ORM',
    'hash_method'  => 'sha256',
    'hash_key'     => 'Somebiglonghaskeyofmixedcharacters102345567709',
    'lifetime'     => 1209600,
    'session_type' => Session::$default,
    'session_key'  => 'auth_user',
);

In my controller , I have a login function with the following code:

if ($_POST)
{
$post = $this->request->post();
$success = Auth::instance()->login($post['email'], $post['password']);

if ($success)
{
echo "Welcome!";
}
else
{
echo "Something goes wrong...";
}

}

I already have activated the modules in the bootstrap.

pastebin link to my role model : http://pastebin.com/bQYReETh
pastebin link to my user model : http://pastebin.com/ufzvKjmA

The problem is that I always come in the else.

Does somebody have an idea whats going on?
Do I miss something?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T21:28:54+00:00Added an answer on June 13, 2026 at 9:28 pm

    @Woodle,

    Maybe adding a _constructor can help.

    public function __construct($id = NULL)
        {
            if ($id !== NULL)
            {
                $this->load(db::select_array($this->fields())->where($this->_table_name.'.username', '=', $id));
            }
            elseif ($this->id) // We loaded this via mysql_result_object
            {
                parent::__construct($id);
            }
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have: brand new clean copy of Kohana 2.3.4 (tried 2.4 RC1 also), a
I'm trying to learn the framework kohana. I have defined a new controller under
New to PHP and MySQL, have heard amazing things about this website from Leo
new to c#. I'm trying to make a simple system where I can search
When I try to make a new instance of the Auth-module object (Auth::factory()), Kohana
I'm new to Kohana but come from a Spring/Java background. In Spring I'm used
I am new to Kohana framework. I am trying to use ORM module in
I'm using Kohana framework for my project development, I need to introduce new rules
I'm trying to get to grips with Kohana framework for a new project. I
This question is about Kohana framework. I'm new to it. Using foreach() I want

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.