Password){ $this->clearMessage(); $this->sessionMessage("Your current password does not match, please try again", "bad"); Director::redirectBack(); }else if($data[NewPassword1] == $data[NewPassword2]){ $member->Password = $data[NewPassword1] ; $member->sendinfo('changePassword'); $member->write(); $this->clearMessage(); $this->sessionMessage("Your password has been changed, and a copy emailed to you.", "good"); Director::redirectBack(); } else{ $this->clearMessage(); $this->sessionMessage("Your have entered your new password differently, try again", "bad"); Director::redirectBack(); } } else { Director::redirect('loginpage'); } } } ?>