APO-Epsilon/apo-website

View on GitHub
r8conf2016/login_updatepw.php

Summary

Maintainability
A
0 mins
Test Coverage

Blank line found at start of control structure
Open

} else {

Blank line found at start of control structure
Open

if (!isset($_SESSION['sessionConfID'])) {

Blank line found at end of control structure
Open


Blank line found at start of control structure
Open

    if (isset($_POST['update_password'])) {

Blank line found at start of control structure
Open

    } else {

Spaces must be used to indent lines; tabs are not allowed
Open

        if ($_POST['new_password_1'] == $_POST['new_password_2']) {

Spaces must be used to indent lines; tabs are not allowed
Open

            if (mysqli_affected_rows($db) == 1) {

Spaces must be used to indent lines; tabs are not allowed
Open

            $sql = "UPDATE `conf_contact_information` SET `password` = '".$hash."' WHERE `id` = ".$user_id." LIMIT 1";

Line exceeds 120 characters; contains 156 characters
Open

                echo "Your password was not changed.  Did you input the correct old password?  Click <a href='./login_updatepw.php'>here</a> to try again.";

Spaces must be used to indent lines; tabs are not allowed
Open

        } else {

Spaces must be used to indent lines; tabs are not allowed
Open

    if (isset($_POST['update_password'])) {

Spaces must be used to indent lines; tabs are not allowed
Open

                echo "Your password has been updated.";

Spaces must be used to indent lines; tabs are not allowed
Open

            } else {

Spaces must be used to indent lines; tabs are not allowed
Open

            $_POST = array_map('mysql_real_escape_string', $_POST);

Spaces must be used to indent lines; tabs are not allowed
Open

    }

Spaces must be used to indent lines; tabs are not allowed
Open

            $result = $db->query($sql);

Spaces must be used to indent lines; tabs are not allowed
Open

            }

Spaces must be used to indent lines; tabs are not allowed
Open

    } else {

Spaces must be used to indent lines; tabs are not allowed
Open

    echo '<div class="entry">You need to login before you can use this page.</div>';

Spaces must be used to indent lines; tabs are not allowed
Open

                echo "Your password was not changed.  Did you input the correct old password?  Click <a href='./login_updatepw.php'>here</a> to try again.";

Spaces must be used to indent lines; tabs are not allowed
Open

            $user_id = $_SESSION['sessionConfID'];

Spaces must be used to indent lines; tabs are not allowed
Open

        }

Spaces must be used to indent lines; tabs are not allowed
Open

            // Update Information

Spaces must be used to indent lines; tabs are not allowed
Open

            echo "Your new passwords did not match. Click <a href='./login_updatepw.php'>here</a> to try again.";

Space before opening parenthesis of function call prohibited
Open

require_once ('session.php');

Space before opening parenthesis of function call prohibited
Open

require_once ('../PasswordHash.php');

Space before opening parenthesis of function call prohibited
Open

require_once ('mysql_access.php');

Line indented incorrectly; expected at least 8 spaces, found 0
Open

echo<<<END

There are no issues that match your filters.

Category
Status