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

Mail notification when passwords are changed #590

Closed
Ypnose opened this issue Sep 26, 2021 · 4 comments
Closed

Mail notification when passwords are changed #590

Ypnose opened this issue Sep 26, 2021 · 4 comments
Labels

Comments

@Ypnose
Copy link

Ypnose commented Sep 26, 2021

Good afternoon,

I am a network administrator managing around 500 accounts. I would like to receive a notification when an user changes his password. Do you think it could be possible without using posthook ?

@coudot
Copy link
Member

coudot commented Sep 26, 2021

Why would you not use a posthook? Seems the easier solution.

@Ypnose
Copy link
Author

Ypnose commented Oct 24, 2021

I was just curious about it. BTW, I have another question : I use something similar to your example written here. Can we espace the $ in $login to prevent the following Apache error :
PHP Notice: Undefined variable: login in /usr/share/self-service-password/conf/config.inc.local.php

Thanks for your help

@faust64
Copy link
Contributor

faust64 commented Oct 24, 2021

Hi,

If you want to configure a custom hook command, in your config.inc.local.php, you only need your variable to identify the script/binary that would be used.
The documentation is confusing though, you are right.

Check here: https://github.com/ltb-project/self-service-password/blob/master/htdocs/change.php#L210-L213
And there: https://github.com/ltb-project/self-service-password/blob/master/lib/functions.inc.php#L716-L725

the posthook and prehook variables are concatenated with logins and other variables based on execution context.
Your configuration just needs to identify which binaries/script to use.
I'll submit a PR for the doc, thanks for letting us know.

faust64 added a commit to Worteks/self-service-password that referenced this issue Oct 24, 2021
coudot added a commit that referenced this issue Oct 25, 2021
@Ypnose
Copy link
Author

Ypnose commented Oct 25, 2021

Thanks a lot @faust64 for your help ! I successfully tested it.

@Ypnose Ypnose closed this as completed Oct 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants