Customizing SMF > SMF Coding Discussion

How to require_once an external php lib to intercept registration?



I need to add a custom register condition to my SMF.

I found a place in function Register2 to intercept with the additional verification check.

I made the function that checks if the condition (via custom profile fields value) and tested it outside of SMF. The function uses a library.

Whenever I try to require_once that file, the Register2 function stops there (I am checking with var_dumps afterwards, nothing after the require_once executes). The path to the extra file is correct. I put the file into the Sources dir, did not help.

I saw there are other files require_once'd so I thought it's something that is possible to do, but apparently it isnt.

How can I require_once an extra file?

Check the error log... either your path is actually wrong or there is something wrong with the file, but either way the error log will tell you what.

Thanks, it was really a typo in the file.


[0] Message Index

Go to full version