Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[question] Preset login username #780

Closed
RPDJF opened this issue Jun 20, 2023 · 8 comments · Fixed by #795
Closed

[question] Preset login username #780

RPDJF opened this issue Jun 20, 2023 · 8 comments · Fixed by #795
Milestone

Comments

@RPDJF
Copy link

RPDJF commented Jun 20, 2023

Hey, small question here
According to the documentation, by setting up the $header_name_preset_login parameter to "username", it should be possible to preset the username box with https://server/?username=testuser, right ?

@RPDJF RPDJF changed the title [Question] Preset login username [question] Preset login username Jun 20, 2023
@coudot
Copy link
Member

coudot commented Jun 20, 2023

An HTTP header is not a GET parameter

@RPDJF
Copy link
Author

RPDJF commented Jun 20, 2023

Right, I've got myself all mixed up
So, there is no solution to preset the username box from the URL itself ?

@coudot
Copy link
Member

coudot commented Jun 20, 2023

It works with the GET parameter but it has nothing to do with the HTTP header option

Open Source is great because you can directly check it: https://github.com/ltb-project/self-service-password/blob/1.5/htdocs/change.php#L47

@RPDJF
Copy link
Author

RPDJF commented Jun 20, 2023

I've already tried the login parameter, but it does send a change request, right ? (and according to the code)
I was asking if it was possible to preset the "username" box only, without trying to change it already

I guess it isn't, it would be a feature request then

@coudot
Copy link
Member

coudot commented Jun 20, 2023

I've already tried the login parameter, but it does send a change request, right ? (and according to the code)

No, it just ask to enter the old password.

I was asking if it was possible to preset the "username" box only, without trying to change it already

There is no communication with LDAP server until the form is complete.

I guess it isn't, it would be a feature request then

You need to explain what is needed, I don't understand

@RPDJF
Copy link
Author

RPDJF commented Jun 20, 2023

I mean, the login paremeter send a warning message that the user needs to first enter the old password as you said thanks to the "$result = "loginrequired"

It would be nice if there was a "username" parameter that only fill the username box without sending a warning message
In my case. what I want to do is posting the link on an email that each users receive

the login parameter does fill the username box, but with a warning message because it isn't intended for this specific usage

@coudot
Copy link
Member

coudot commented Jun 21, 2023

This could indeed be an improvement

@coudot
Copy link
Member

coudot commented Aug 18, 2023

Done in #795

@coudot coudot closed this as completed Aug 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants