|
@@ 14-24 (lines=11) @@
|
| 11 |
|
|
| 12 |
|
// Obtain the Member object. If the user got this far, they must have already been synced. |
| 13 |
|
$member = Member::currentUser(); |
| 14 |
|
if (!$member) { |
| 15 |
|
if (Session::get('AutoLoginHash')) { |
| 16 |
|
$member = Member::member_from_autologinhash(Session::get('AutoLoginHash')); |
| 17 |
|
} |
| 18 |
|
|
| 19 |
|
// The user is not logged in and no valid auto login hash is available |
| 20 |
|
if (!$member) { |
| 21 |
|
Session::clear('AutoLoginHash'); |
| 22 |
|
return $this->controller->redirect($this->controller->Link('login')); |
| 23 |
|
} |
| 24 |
|
} |
| 25 |
|
|
| 26 |
|
$data = Injector::inst()->get('LDAPService')->getUserByGUID($member->GUID, array('samaccountname')); |
| 27 |
|
|
|
@@ 84-94 (lines=11) @@
|
| 81 |
|
} |
| 82 |
|
} |
| 83 |
|
|
| 84 |
|
if (!$member) { |
| 85 |
|
if (Session::get('AutoLoginHash')) { |
| 86 |
|
$member = Member::member_from_autologinhash(Session::get('AutoLoginHash')); |
| 87 |
|
} |
| 88 |
|
|
| 89 |
|
// The user is not logged in and no valid auto login hash is available |
| 90 |
|
if (!$member) { |
| 91 |
|
Session::clear('AutoLoginHash'); |
| 92 |
|
return $this->controller->redirect($this->controller->Link('login')); |
| 93 |
|
} |
| 94 |
|
} |
| 95 |
|
|
| 96 |
|
// Check the new password |
| 97 |
|
if (empty($data['NewPassword1'])) { |