<commit_before><?php

include_once 'header.php';
include_once 'database.php';
include_once 'mail.php';
include_once 'tohtml.php';

$res = updateTable( "logins", "login"
    , Array( "valid_until", "title", "laboffice"
        , 'joined_on' , 'alternative_email' )
    , $_POST 
    );

if( $res )
{
    echo printInfo( "User details have been updated sucessfully" );
    // Now send an email to user.
    $info = getUserInfo( $_SESSION[ 'user' ] );

    sendEmail( arrayToVerticalTableHTML( $info, "details" )
        , "Your details have been updated successfully."
        , $info[ 'email' ]
        );

    goToPage( 'user.php', 1 );
    exit;
}

echo printWarning( "Could not update user details " );<commit_msg>let user update his/her name.<commit_after><?php

include_once 'header.php';
include_once 'database.php';
include_once 'mail.php';
include_once 'tohtml.php';

$res = updateTable( "logins", "login"
    , Array( 
        "valid_until", "title", "laboffice"
        , 'joined_on' , 'alternative_email' 
        , "first_name", "last_name"
        )
    , $_POST 
    );

if( $res )
{
    echo printInfo( "User details have been updated sucessfully" );
    // Now send an email to user.
    $info = getUserInfo( $_SESSION[ 'user' ] );

    sendEmail( arrayToVerticalTableHTML( $info, "details" )
        , "Your details have been updated successfully."
        , $info[ 'email' ]
        );

    goToPage( 'user.php', 1 );
    exit;
}

echo printWarning( "Could not update user details " );
{'fraction_non_alphanumeric': 0.14513981358189082, 'fraction_numerical': 0.0013315579227696406, 'mean_word_length': 3.018716577540107, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5355694', 'n_tokens_mistral': 500, 'n_tokens_neox': 489, 'n_words': 132}