-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Send password reset link when creating new users with e-mail #18485
Conversation
ISecureRandom::CHAR_DIGITS. | ||
ISecureRandom::CHAR_LOWER. | ||
ISecureRandom::CHAR_UPPER); | ||
$this->config->setUserValue($username, 'owncloud', 'lostpassword', $token); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is error-prone as it duplicates the logic from the controller and will lead to problems once this gets changed, please make this a little bit centrally.
(that said this will collide with #18491 and one of those two needs to get rebased)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a little bit centrally => a central class for this stuff but not twice please ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@LukasReschke Good catch. But a new class just for that would probably be too a bit too much. Is there an existing place where this should go?
We could add something like IUser::createPasswordResetToken()
to encapsulate this and return the token from it. I don't know the codebase of ownCloud that well (yet) so there probably is something more appropriate that I have missed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mhm… IUser would be public API. I would love to avoid having it in the public API, nothing that app authors should mess with in any way.
Let me think about something. I'm anyways refactoring some auth stuff at the moment 🙊
The whole unit test suite on OS X will fail. cd into |
Running a single test should be fine for now. I just want to make sure that I don't break stuff and make Mr. Vader unhappy ;-).
I am missing something here. It probably does not use the correct config.php and tries something like an sqlite db or a socket file that does not exist. I did Thanks for your patience with me. |
Any updates on this issue? |
Put up a PR that fixes the failing test #20379 |
Please rebase, there are conflicts. Also, this probably needs a config.php setting disabled by default to make it optional behavior. |
@Takuto88 can you rebase ? Note that master now has some new APIs and with a bit of luck this might become easier / cleaner to implement. |
00005462 |
70f0a73
to
dadbec1
Compare
Thanks a lot for your contribution! Alternatively you can add a comment here where you state that this contribution is MIT licensed. Some more details about out pull request workflow can be found here: http://owncloud.org/code-reviews-on-github/ |
funny - looks like @Takuto88 got remove from the core developer team. |
@DeepDiver1975: I've left the organisation because sadly, I have little time to contribute to this project. I have signed the contribution agreement therefore any contributions by me can be used by the owncoud project. |
Ah - this explains this ... well ... we use the team membership to identify if the agreement was signed or not. |
Would move to 9.2 as this is a new feature and we're past feature freeze. Also I think this needs some kind of config switch for admins who don't want to automatically send these temp passwords. CC @felixboehm |
@PVince81 |
This exactly what I was looking for, but there is a problem. This won't work with enabled encryption app, because keys aren't yet initialized. |
Doesn't seem to work with version 9.0.2. When trying to setup the password it reports that token is invalid. |
dadbec1
to
ec2bee5
Compare
ec2bee5
to
cefe3b1
Compare
cefe3b1
to
c284938
Compare
closing due to lack of feedback / abandonned. there is a new version here: #28113 |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
This implements #17398.
Instead of the Login-URL the user is sent to the reset password form where he can set his initial password.
Important note about unit test
I've done my best to update the unit test but I am unable to get the unit tests working on my system at all so this is blind.
Running
./autotest.sh sqlite
as described in the developer manual just produces this output on my system:PHPUnit is installed, running OS X 10.10.5 which seems to be unsupported?. Any pointers are welcome.