rejetto forum
Software => HFS ~ HTTP File Server => HTML & templates => Topic started by: Gio on February 10, 2010, 05:26:54 PM
-
Hello, I'm looking for a ready made template (better if based on RAWR-template) with the possibility to change the user password. I don't need admin panel, but just the possibility for the users to setup the passwords on their own.
It need also to give the possibility to delete the files uploaded. I'm actually doing some test using the latest beta 2.3 build 253 with IE on a intranet
Any suggestion?
-
you can start from this example to get something decent.
this is the form to be placed on the page
<form method=post action="/~selfpasschange>
{.!New Password.} <input type="password" name="newpass"> <input type=submit value="{.!Change.}">
</form>
this is a section to append to the template
[selfpasschange]
{.if|%user%|
{:{.set account|%user%|password={.postvar|newpass.}.}:}
/if.}
-
Hi,
sorry, but I don't know exactly how to proceed. I'm using the RAWR-template 0.1.2. I suppose that I've to add this code at the end of the template:
Code:
[selfpasschange]
{.if|%user%|
{:{.set account|%user%|password={.postvar|newpass.}.}:}
/if.}
Where I've to place the following code?
Code:
<form method=post action="/~selfpasschange>
{.!New Password.} <input type="password" name="newpass"> <input type=submit value="{.!Change.}">
</form>
Thank you for the support.
-
you are right.
i'll be more detailed
put this at the end of the template
[selfpasschange]
{.if|%user%|
{:{.set account|%user%|password={.postvar|newpass.}.} Ok!:}
/if.}
you see, i added an "Ok!"
and put this
{.if|%user%|
<div class="module">
<div class="modHeading">
{.!New Password.}
</div>
<div class="modContent">
<form method=post action="/~selfpasschange">
<input type="password" name="newpass"> <input type=submit value="{.!Change.}">
</form>
</div>
</div>
.}
exactly before this line:
{.if|{.{.!mod_folder_tasks.}=on.}|
-
It works fine; I post the template with the changes.
Thank you very much for the support.
-
Hi rejetto,
today I cannot change my password; I don't know why....
After the login, I've enter a new password, the new windows doesn't say "OK" and the password is not changed. During friday, I've not changed the template, but I've just added folders and user rights.
Do you have any suggestion?
Thank you in advance for your reply.
-
1. the old password is still working?
2. did you try from other computers?
3. did you try to restore the working template you posted on the forum?
otherwise
- menu > debug > enable macros.log
- try to change the password
- post your macros.log file here
-
1. Yes, the old password is working. The account is without password
2. Yes, but the result is the same. The problem was detected by one user.
3. Yes, Ive compared the 2 templates and seems to be identical.
It's very strange, because before posting the template, the password change was working properly; I've tested successfully more several times.
I don't know if could help: I'm running more than one instance of HFS with different SW version. But also, switching off the other instances, the problem is present.
I send you the macro.log.
Thank you for the support.
-
i downloaded your log, and removed it from the forum because of possible information leaking, i didn't think of.
next time we should remember to do it via email. ;)
anyway, it was useful, because i saw this
> %user%
<
> if||
{:{.set account||password={.postvar|newpass.}.} Ok!:}
/if
<
it means the request is made without specifying the user. But it's the browser that should specify it.
so, it's like you are not logged in, at least for that request.
-
It's possible to change the password only after the login... I mean that the windows "New password" is shown only after the login (and I see it). I attach some snapshots for a better understanding.
I agree that is something related to the web browser: do you have some suggestions?
Thank you.
-
ok, i think i got the problem.
replace this:
/~selfpasschange
with this:
?mode=section&id=selfpasschange
reason:
they are the same for HFS, but not for the browser, because it considers the address to be referring to the home/root (because of the initial slash) where you were not logged in. So, it decides it's not necessary to send the password.
-
Ok, it works. I attach the template.
Thank you.