public function generateSubmissionKey($memberID, $dbConnection = null)
 {
     $returnValue = null;
     try {
         $memberKey = rand(1000, 9999) . $memberID . time();
         $submissionKey = EncryptionUtilities::encryptString($memberKey);
         if ($submissionKey != null) {
             if (MemberSubmissionDao::insertMemberSubmission($memberID, $submissionKey, $dbConnection)) {
                 $returnValue = trim($submissionKey);
             }
         }
     } catch (Exception $ex) {
         $returnValue = null;
     }
     return $returnValue;
 }
    $dbConnection = DatabaseUtilities::getDatabaseConnection();
    //Get the current user's ID and details.
    $memberID = LoginController::getLoggedInMemberID($dbConnection);
    if ($memberID == null) {
        header("Location: login.php");
        exit;
    } else {
        if (isset($_GET['memberID'])) {
            $viewMemberID = $_GET['memberID'];
        } else {
            $viewMemberID = $memberID;
        }
        if ($viewMemberID != null) {
            $memberDetails = MemberDao::selectMemberDetails($viewMemberID);
            //Encrypt the ID so it can be used for submissions.
            $memberIDEncrypted = EncryptionUtilities::encryptString($viewMemberID);
            if ($memberDetails != null && $memberIDEncrypted != null) {
                if ($viewMemberID == $memberID) {
                    $editable = true;
                }
                $memberInstruments = MemberInstrumentController::getMemberInstruments($viewMemberID, false, $dbConnection);
                $memberPurposes = MemberPurposeDao::selectMemberPurpose($viewMemberID, $dbConnection);
                $memberGenres = MemberGenreDao::selectMemberGenres($viewMemberID, $dbConnection);
                $processed = true;
            } else {
                $errorCode = 1;
            }
        }
    }
} catch (Exception $ex) {
    $processed = false;