1

パスワードを紛失したユーザーのトークン/検証コードを生成する必要がありますが、1) 非常に古い Joomla インストール (1.5.15) であり、2) 1 つであるため、既存の Joomla インストールに頼ることはできません。私のプロジェクトの要件の。サードパーティの仕事なので何も触ることはできませんが、モバイル ユーザー (今のところ iOS と Android) 用のパスワード回復システムを実装する必要があり、パスワード回復システムがどのアルゴリズムを使用するかを知る必要があります。

誰がそれがどのように機能するか教えてもらえますか?

4

1 に答える 1

2

In Joomla You can check following files

components/com_users/controller/reset.php
components/com_users/modles/reset.php

In controller file you can find one function name request();

It uses a function the model processResetRequest();

In side this function it will create the activation token with following codes

     // Set the confirmation token.
$token = JUtility::getHash(JUserHelper::genRandomPassword());
$salt = JUserHelper::getSalt('crypt-md5');
$hashedToken = md5($token.$salt).':'.$salt;

$user->activation = $hashedToken;

Also joomla is verifying the token its getting correct then it will allow users to create new password.If you want to do that you can use following code for joomla standard password.

jimport('joomla.user.helper');
 $salt = JUserHelper::genRandomPassword(32);
 $crypt = JUserHelper::getCryptedPassword($password_choose, $salt);
 $password = $crypt.':'.$salt;

the above code is creating the joomla passwords.

If you are planning to use this for mobile device and without editing the core joomla the you can create a file on root and achieve it as like this

Hope this may help you..

于 2013-03-19T11:40:53.100 に答える