How to know if who created the order
What you can do is you can create a small table which keeps your order id, user id and anything else you want. Whenever the order is saved you can check whether a record exists for the particular order id. If there is no you add the record otherwise you don't change the current record.
For that you can use hook_commerce_order_presave(). Inside this hook you can use your code l

option 1

function yourmodule_commerce_order_presave($order){
    if(!db_result(db_query('SELECT * FROM {your_table} WHERE orderid = %d', $order-&gt;id)))
        $user = $GLOBALS['user'];
        if ($user-&gt;uid) {
            $form['field_order_created_by'][LANGUAGE_NONE][0]['target_id']['#default_value'] =       $user-&gt;name;

        //add new record to yuor table
    }

}


option 2

function yourmodule_commerce_order_presave($order){
    if(!check_record_exists($order-&gt;id))
        $user = $GLOBALS['user'];
        if ($user-&gt;uid) {
        $form['field_order_created_by'][LANGUAGE_NONE][0]['target_id']['#default_value'] =       $user-&gt;name;
    //add new record to your table
}

function check_record_exists($oid){
    $exists = db_result(db_query('SELECT * FROM {your_table} WHERE orderid = %d', $oid));
}