Answer the question
In order to leave comments, you need to log in
How to change password in Kohana framework?
Hello. I got an ancient self-written admin panel on Kohana to work. You need to change the password to restrict access to old admins. But the developer did not add the password change functionality, but he created the admin user himself.
I dug into the sources and found a file in which the login data is hardwired. When editing, the ability to enter the admin panel disappears (writes "wrong password"), so I decided that this is where you need to dig. But I can't figure it out.
modules -> auth -> config -> auth.php
<?php defined('SYSPATH') OR die('No direct access allowed.');
return array(
'driver' => 'File',
'hash_method' => 'sha256',
'hash_key' => 'blablabla',
'lifetime' => 1209600,
'session_type' => Session::$default,
'session_key' => 'auth_user',
// Username/password combinations for the Auth File driver
'users' => array(
'admin' => 'хэш пароля',
),
);
Answer the question
In order to leave comments, you need to log in
After all, google has everything. Look here: Kohana 3.1: Simple User Authentication
There is
even a video in the article " Kohana video course " - "Working with the authorization module in Kohana".
If you just need to close access quickly, try using " HTTP basic authentication "
There is an article on this topic
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question