× This forum is read only. As of July 23, 2019, the UserSpice forums have been closed. To receive support, please join our Discord by clicking here. Thank you!

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Changes to init.php and classes
#1
1) If I make changes to init.php, should I copy init.php to userc/ or can init.php be edited without causing problems with future updates?
2) If I make changes to the existing classes, is there a recommended way of doing that to avoid problems during future upgrades?

Thanks.
  Reply
#2
(12-11-2018, 12:43 PM)trequel Wrote: 1) If I make changes to init.php, should I copy init.php to userc/ or can init.php be edited without causing problems with future updates?
2) If I make changes to the existing classes, is there a recommended way of doing that to avoid problems during future upgrades?

Thanks.

You can change init.php to your heart's content.  

As far as classes goes, that gets a little trickier. Can you give me an idea of what kind of changes you want to make?  Also, what about doing something like 

class DBPRo extends DB {
  Reply
#3
(12-11-2018, 01:38 PM)mudmin Wrote:
(12-11-2018, 12:43 PM)trequel Wrote: 1) If I make changes to init.php, should I copy init.php to userc/ or can init.php be edited without causing problems with future updates?
2) If I make changes to the existing classes, is there a recommended way of doing that to avoid problems during future upgrades?

Thanks.

You can change init.php to your heart's content.  

As far as classes goes, that gets a little trickier. Can you give me an idea of what kind of changes you want to make?  Also, what about doing something like 

class DBPRo extends DB {

Thank you for that information.

I have added a column to the profiles table and want to store an additional piece of information in that table when a User is created. Additionally, when a user is logging in, I want to get profile information back.

I've created a Profile class to retrieve profiles table info, but have modified User to insert that additional field.
  Reply
#4
We don't update classes very often, so you could just look for changes on those updates.

There's another way to do it where you won't have to worry about class updates breaking it.

usersc/scripts/during_user_creation.php allows you to do custom things when a user is created
usersc/scripts/custom_login_script.php allows you to run tasks on login
  Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)