Пример #1
0
             $new_password = trim($_POST['txtNewPassword']);
             $cnf_password = trim($_POST['txtCnfPassword']);
             if ($new_password === '') {
                 $errors[] = 'Please enter your New password.';
             } else {
                 if (strlen($new_password) < 3 || strlen($new_password) > 15) {
                     $errors[] = 'New Password must consist of minimum 3 and maximum 15 characters.';
                 } else {
                     if ($new_password != $cnf_password) {
                         $errors[] = 'New Password and Confirm New Password do not match.';
                     }
                 }
             }
             if (sizeof($errors) == 0) {
                 try {
                     $arrUpdPwdResult = resetUserPassword($strEmail, MD5($new_password), $reqType, $strRequestedBy, $objDataHelper);
                     if ($arrUpdPwdResult) {
                         $success = 'Password changed successfully. Click here to <a href="' . $SITE_ROOT . '">SIGN IN.</a>';
                         $deleteReqPwd = deletePasswordRequestDtls($strEmail, $strRequestedBy, $objDataHelper);
                     }
                 } catch (Exception $a) {
                     throw new Exception("resetpassword.php : resetUserPassword : Error while Changing Password" . $a->getMessage(), 613);
                 }
             }
         }
     } else {
         $msg[] = 'Sorry, Your reset password link is invalid.';
     }
 } else {
     $msg[] = 'Sorry, Your reset password link is invalid.';
 }
Пример #2
0
 * prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR
 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
 * DAMAGE.
 */
require_once '../includes/config.php';
if (isset($_GET['action'])) {
    switch ($_GET['action']) {
        case "delete":
            deleteUser($_GET['id']);
            echo "worked!";
            break;
        case "reset":
            resetUserPassword($_GET['id']);
            echo "worked!";
            break;
        case "admin":
            makeUserAdmin($_GET['id']);
            echo "worked!";
            break;
    }
}
Пример #3
0
	);

	init2();

	// perform tests...
	switch($_GET['api']) {

		case '24':
			getPersonPermissions($uuid, $user, $pass);
			addComment($uuid, $comment, $status, $user, $pass);
			version();

		case '2.3':
			searchCount("test", "t");
			searchCountWithAuth("test", "t", $user, $pass);
			resetUserPassword($email);

		case '2.2':
			reReportPerson($uuid, $personXML, $eventShortname, $xmlFormat, $user, $pass);

		case '2.1':
			getImageCountsAndTokens($user, $pass);
			getImageList($tokenStart, $tokenEnd, $user, $pass);
			getImageListBlock($tokenStart, $stride, $user, $pass);
			getNullTokenList($tokenStart, $tokenEnd, $user, $pass);

		case '2.0':
			expirePerson($uuid, '', $user, $pass);
			getPersonExpiryDate($uuid);
			setPersonExpiryDate($uuid, $expiryDate, $user, $pass);
			setPersonExpiryDateOneYear($uuid, $user, $pass);