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

API Add change password functionality via LDAP server #5

Merged

Conversation

robbieaverill
Copy link
Contributor

@robbieaverill robbieaverill commented Oct 4, 2017

Requirements

Changes

$member->FirstName = 'Joe';
$member->Username = 'jbloggs';
$member->write();
```
Copy link
Contributor Author

@robbieaverill robbieaverill Oct 4, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More extensive docs rewrite is coming next edit #6

@robbieaverill robbieaverill force-pushed the pulls/1.0/fix-change-password branch from 1696f0c to 3c7897b Compare October 4, 2017 22:03
@robbieaverill
Copy link
Contributor Author

robbieaverill commented Oct 4, 2017

SS core doesn't trigger Member::changePassword when you update a password in a member profile via the admin interface. It would be ideal if it did, but it's only being used in the "forgot my password" type login forms at the moment. @halkyon @mateusz what are your thoughts on this? Log a separate issue/PR to core to make it use changePassword/add a hack to this module instead?

Edit: I've logged this on framework for now - silverstripe/silverstripe-framework#7435

@robbieaverill robbieaverill changed the title API Add change password functionality via LDAP server WIP: API Add change password functionality via LDAP server Oct 4, 2017
@robbieaverill robbieaverill changed the title WIP: API Add change password functionality via LDAP server API Add change password functionality via LDAP server Oct 10, 2017
@NightJar NightJar merged commit 432a3b1 into silverstripe:master Oct 16, 2017
@NightJar NightJar deleted the pulls/1.0/fix-change-password branch October 16, 2017 20:38
$result = $result ?: ValidationResult::create();

/** @var LDAPService $service */
$service = Injector::inst()->get(LDAPService::class);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could replace that via Setter Dependency Injection to get the server and allow a custom LDAP Service.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea, #7

use SilverStripe\Control\Session;
use SilverStripe\Core\Injector\Injector;
use SilverStripe\Dev\SapphireTest;
use SIlverStripe\LDAP\Authenticators\LDAPAuthenticator;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That should be use SilverStripe\LDAP\Authenticators\LDAPAuthenticator; (with a lowercase i)

use SilverStripe\Core\Injector\Injector;
use SilverStripe\Dev\SapphireTest;
use SIlverStripe\LDAP\Authenticators\LDAPAuthenticator;
use SIlverStripe\LDAP\Authenticators\LDAPChangePasswordHandler;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That should be use SilverStripe\LDAP\Authenticators\LDAPChangePasswordHandler; (with a lowercase i)

use SilverStripe\Dev\SapphireTest;
use SIlverStripe\LDAP\Authenticators\LDAPAuthenticator;
use SIlverStripe\LDAP\Authenticators\LDAPChangePasswordHandler;
use SIlverStripe\LDAP\Forms\LDAPChangePasswordForm;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That should be use SilverStripe\LDAP\Forms\LDAPChangePasswordForm; (with a lowercase i)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants