The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.2.25 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/printthread.php 16 require_once
Warning [2] Undefined property: MyLanguage::$archive_pages - Line: 2 - File: printthread.php(287) : eval()'d code PHP 8.2.25 (Linux)
File Line Function
/printthread.php(287) : eval()'d code 2 errorHandler->error
/printthread.php 287 eval
/printthread.php 117 printthread_multipage



UserSpice
Change Username login - Printable Version

+- UserSpice (https://userspice.com/forums)
+-- Forum: General (https://userspice.com/forums/forumdisplay.php?fid=20)
+--- Forum: New to UserSpice? (https://userspice.com/forums/forumdisplay.php?fid=22)
+--- Thread: Change Username login (/showthread.php?tid=323)

Pages: 1 2 3 4


Change Username login - rdlook04 - 11-03-2016

umm. when i try to install userspice. it show a error.

System Requirement Check

We're sorry, but your PHP version is out of date. Please update to PHP 5.5.0 or later to continue. PHP Website




Change Username login - mudmin - 11-03-2016

Yep. That's the problem. I'm guessing you're using 5.3. Who is your hosting provider? Is there a place in your cpanel to change to PHP 5.6?


Change Username login - rdlook04 - 11-03-2016

is a intranet, is using php 5.4.45, already ask for a change of the version.


Change Username login - rdlook04 - 11-03-2016

ok. imposible the update, in the intranet exist anothers apps, that maybe get a error after the update


Change Username login - mudmin - 11-03-2016

Welllll, your best bet is going to be userspice 3. Here's the deal. Version 3.3 is a little more polished, but it changed the directory structure a little bit, so I never wrote a way to update 3.3 to 4.0. 3.2 works great and can be upgraded. Note that these aren't officially supported and they are not object oriented/pdo, although you can easily include the userspice 4 classes in manually if you want to do your queries, etc.

https://userspice.org/UserSpice3.2.0.zip

https://userspice.org/UserSpice33.zip

If you use 3.2 and your intranet gets updated, you can install...

https://userspice.org/us3to4.zip



Change Username login - mudmin - 11-03-2016

Bad news. You need php 5.5 because of the bcrypt encryption in UserSpice 3.2/3.3.

That leaves https://userspice.org/UserSpice2.5.6.zip although you can still update that all the way to 4.1.8b with a little trouble if you need to.


Change Username login - rdlook04 - 11-11-2016

ok.. allready apply some css on this and looks the same like 4.x,

but i dont understand on this how to call some DB info by ID, on the 4.x is pretty easy but on this

i do <?php echo $loggedInUser->username ?>, and gets me the username (on the table id=1 and user_name=admin), but i try to call anothers fields like "sign_up_stamp", "active", some customs fields and i cant find the place to declare them.

mud if you give me a hint please.


Change Username login - mudmin - 11-11-2016

So there's good news. Even though UserSpice 3 wasn't actually using the classes that we use in UserSpice 4, I included them. In fact, you can feel free to grab the latest versions of them from version 4.1.8c if you want.

What makes this particularly good is that you can write all your code in UserSpice 4/5 style and if you upgrade, everything will work. Since it's already included, here's how you would do a query...

Instantiate the database - only needs to be done once per page...can be done in the header
Code:
$db = DB::getInstance();

Write a query to search all users and only bring back the one that is logged in.
Code:
$findUserQ = $db->query("SELECT * FROM uc_users where id = ?",array($loggedInUser->user_id));
Code:
$u = $findUserQ->first();

Echo out whatever db field you want to echo out by putting the column name after the ->
Code:
echo $u->last_activation_request;

I hope that helps.



Change Username login - rdlook04 - 11-11-2016

mudmin. i am using UserSpice2.5.6.zip. is the only one that work on this old server Big Grin

so i have to get the classes from the 4x ? for this ?

i just try and get Fatal error: Class 'DB' not found in . i have to declare this on func.php . right ?


Change Username login - mudmin - 11-12-2016

I just tested this. I would copy all the userspice 4 classes into the models folder

Then edit models/config.php

Right after the line
require_once("funcs.php");

Add
require_once("Config.php");
require_once("Cookie.php");
require_once("DB.php");
require_once("Hash.php");
require_once("Input.php");
require_once("Redirect.php");
require_once("Session.php");
require_once("Token.php");
require_once("Validate.php");

And that SHOULD do it.