Architecture / Installation

Architecture / Installation

Migration of trac users to tiki

posts: 11 Germany
Markus Beckschulte wrote:

So my question is: How can I store the old MD5 hashes in the user_user table? Does anyone have an idea?

Ok, in tiki, the function validate_user_tiki performs the password check. If you take a look at this function, you will see that there are mechanism for supporting old hashes of deprecated versions of tiki, namely md5 - so nearly what I need.
To also support the old htdigest md5's, I added the following:
$realmtrac = ':oldRealm:';
if (! empty($pass) && $res'hash' === md5($user.$realmtrac.$pass)) {
$this->set_user_password($res'userId', $pass);
return USER_VALID, $user;
With this you can store the plain hashes, without any prefix, in the table users_users in the collumn hash.
Hopefully this will help someone, I am really a bit disappointed of the community of tiki that they couldn't even give me a little hint to this specific function. I can not immagine that no one did not know about it.

Edit: the function can be found in the userslib.php, line 1875