Over-riding Core files

Permalink
Hi

I wanted to add a slight change to the core Register.php do_register function ( a full name field for a particular use actually)
I can do the code but cannot find where I should place my amended over-ride copy of /concrete/core/controllers/single_pages/register.php

I want to over-ride so I can still do normal updates without losing my bespoke changes.

I have tried putting it in several places without any joy - it is not being picked up as I step through the code

/controllers/core/single_pages/register.php
/controllers/single_pages/core/register.php
/controllers/single_pages/register.php

I am now a bit confused - I have been able to over-rise standard other concrete5 files like blocks and dashboard single pages but this is within the concrete/core folder and seems to be different?

Any help would be appreciated

Latest v 5.6.2 btw

 
bbeng89 replied on at Permalink Reply
bbeng89
Have you tried putting it just in the /controllers directory?
bbeng89 replied on at Permalink Best Answer Reply
bbeng89
Also I should note that you want to override the file:

/concrete/controllers/register.php

It's just a stub that looks like this:

<?php 
defined('C5_EXECUTE') or die("Access Denied.");
class RegisterController extends Concrete5_Controller_Register {
}


But you can add all your custom code here
keithbernard replied on at Permalink Reply
Thanks bbeng89

Just the ticket - works fine now!
bbeng89 replied on at Permalink Reply
bbeng89
No problem, glad I could help! Since that fixed your problem you probably want to click "Mark as best answer" in case anyone else comes across the thread. Thanks!