02-19-2016, 04:01 AM
//If you got a notification from a different username, I had to kill off a couple of accounts that were trying to attack the site. We got a mini DOS attack today. Everything seems fine now.
The great thing is that there’s nothing wrong at all with UserSpice 3. If people want to do things procedurally, it’s a great choice. On top of that, if they get one of the later versions with the nice dashboard and the new classes, they can even do their own oop queries. I need to do a better job of documenting the upgrade process.
The general rule of thumb is…
1. All the “userspice” pages are new so you would lose any changes if you modified yours.
2. Anything you wrote on your frontend will work fine with a few caveats.
a. If you’re making calls using the old built in functions that look for the logged in user. It will need to be updated. Basically
if(isUserLoggedIn()) {
becomes
if($user->isLoggedIn()) {
b. If you are using US3 procedural ways to echo out things like the user name, you have to use the new OOP way of doing that. by default it’s
<?=$user->data()->username?> or whatever you want to echo out.
3. I meticulously rewrote every single function that US3 actually used into OOP/PDO PHP. So the biggest thing you’ll get is that if you were (and you probably weren’t) using US3’s built in functions, you might receive an object back instead of an array and might need to update a bit. For the most part, though, people seemed to build their own db classes and things like that and US4 will play nicely with those. Especially if you’re willing to call your db variable anything other than $db.
The great thing is that there’s nothing wrong at all with UserSpice 3. If people want to do things procedurally, it’s a great choice. On top of that, if they get one of the later versions with the nice dashboard and the new classes, they can even do their own oop queries. I need to do a better job of documenting the upgrade process.
The general rule of thumb is…
1. All the “userspice” pages are new so you would lose any changes if you modified yours.
2. Anything you wrote on your frontend will work fine with a few caveats.
a. If you’re making calls using the old built in functions that look for the logged in user. It will need to be updated. Basically
if(isUserLoggedIn()) {
becomes
if($user->isLoggedIn()) {
b. If you are using US3 procedural ways to echo out things like the user name, you have to use the new OOP way of doing that. by default it’s
<?=$user->data()->username?> or whatever you want to echo out.
3. I meticulously rewrote every single function that US3 actually used into OOP/PDO PHP. So the biggest thing you’ll get is that if you were (and you probably weren’t) using US3’s built in functions, you might receive an object back instead of an array and might need to update a bit. For the most part, though, people seemed to build their own db classes and things like that and US4 will play nicely with those. Especially if you’re willing to call your db variable anything other than $db.