Exemple #1
0
function snapSavePassword($snapDbConn, $data)
{
    $newpass = md5($data['password']);
    $email = $data['emailaddress'];
    $query = "update snap_users set password = ? where emailaddress = ? limit 1 ";
    $arrParams = array('ss', &$newpass, &$email);
    $result = snapDbQuery($snapDbConn, $query, $arrParams);
    if (!$result['affected_rows']) {
        return 0;
    }
    $linkid = $data['linkid'];
    snapUpdateLinkStatus($snapDbConn, $linkid, 2);
    return array('type' => 'success', 'descr' => 'Password changed successfully');
}
Exemple #2
0
if ($uniqid != $verifyid) {
    sendError(3);
}
//linkstats = 1 mean old link
if ($linkstatus == 1) {
    sendError(4);
}
//linkstats = 2 mean used link
if ($linkstatus == 2) {
    sendError(5);
}
//check if linktime has expiered i.e a day old
$curtime = time();
$cmptime = $linktime + 24 * 60 * 60;
if ($curtime > $cmptime) {
    snapUpdateLinkStatus($snapDbConn, $linkid, 1);
    sendError(3);
}
?>
<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<title>MeetOn SNAP - Reset Password</title>
	<meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
	<link href="common/css/bootstrap.css" rel="stylesheet" type="text/css" />
	<link href="common/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
	<link href="postlogin/css/ionicons.min.css" rel="stylesheet" type="text/css" />
	<link href="prelogin/css/AdminLTE.css" rel="stylesheet" type="text/css" />
	<link href="common/css/skin-blue-light.min.css" rel="stylesheet" type="text/css" />
</head>