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
/portal.php 39 require_once





× 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!

Welcome, Guest
You have to register before you can post on our site.

Username
  

Password
  





Search Forums



(Advanced Search)

Forum Statistics
» Members: 1,007
» Latest member: kavitasinghji
» Forum threads: 1,324
» Forum posts: 7,788

Full Statistics

Online Users
There are currently 538 online users.
» 0 Member(s) | 536 Guest(s)
Bing, Google

Latest Threads
UserSpice Alpha Testing a...
Forum: News Center
Last Post: ivinsons
11-08-2024, 06:13 PM
» Replies: 13
» Views: 42,475
UserSpice 4.4 Development
Forum: News Center
Last Post: Amelie12
09-21-2024, 12:23 PM
» Replies: 4
» Views: 15,199
Welcome to the new UserSp...
Forum: News Center
Last Post: ivinsons
08-25-2024, 07:39 AM
» Replies: 2
» Views: 27,918
How to use hasPerm
Forum: UserSpice 4.4
Last Post: mudmin
07-20-2019, 02:45 PM
» Replies: 1
» Views: 13,755
Session issue? What I sho...
Forum: UserSpice 4.4
Last Post: Parth
07-17-2019, 05:06 PM
» Replies: 4
» Views: 14,502
Email Error
Forum: UserSpice 4.4
Last Post: Brandin
07-17-2019, 04:47 PM
» Replies: 1
» Views: 6,623
{ Missing Text } after up...
Forum: UserSpice 4.4
Last Post: Brandin
07-16-2019, 04:23 PM
» Replies: 22
» Views: 53,638
Best Practice Info
Forum: New to UserSpice?
Last Post: Brandin
07-16-2019, 11:55 AM
» Replies: 1
» Views: 13,490
Force to use 2FA -always-
Forum: UserSpice 4.4
Last Post: Brandin
07-12-2019, 12:43 PM
» Replies: 1
» Views: 6,636
e-mail not verifying
Forum: UserSpice 4.4
Last Post: LBC
07-10-2019, 11:34 AM
» Replies: 31
» Views: 76,232

 
  Error updating to 4.3 - Issue with logger function
Posted by: muhammedc - 12-01-2017, 01:56 PM - Forum: UserSpice 4.3 and Below - Replies (2)

Hi

Get this error on the 2nd part of the update:

Fatal error: Uncaught Error: Call to undefined function logger() in C:\Dropbox\Just Claim IT\Dev\repos\jci-webapp\users\update.php:34 Stack trace: #0 {main} thrown in C:\Dropbox\Just Claim IT\Dev\repos\jci-webapp\users\update.php on line 34

I am assuming that logger function is not being pulled from one of the classes... Here is by init.php to make sure i got it right:

<?php
session_start();
$abs_us_root=$_SERVER['DOCUMENT_ROOT'];

$self_path=explode("/", $_SERVER['PHP_SELF']);
$self_path_length=count($self_path);
$file_found=FALSE;

for($i = 1; $i < $self_path_length; $i++){
array_splice($self_path, $self_path_length-$i, $i);
$us_url_root=implode("/",$self_path)."/";

if (file_exists($abs_us_root.$us_url_root.'z_us_root.php')){
$file_found=TRUE;
break;
}else{
$file_found=FALSE;
}
}

require_once $abs_us_root.$us_url_root.'users/classes/class.autoloader.php';
require_once $abs_us_root.$us_url_root.'users/helpers/helpers.php';

// Set config
$GLOBALS['config'] = array(
'mysql' => array('host' => 'localhost',
'username' => 'Username',
'password' => 'Password123',
'db' => 'jci_main',
),
'remember' => array(
'cookie_name' => 'pmqesoxiw388779csb',
'cookie_expiry' => 604800 //One week, feel free to make it longer
),
'session' => array(
'session_name' => 'user',
'token_name' => 'token',
)
);

//If you changed your UserSpice or UserCake database prefix
//put it here.
$db_table_prefix = "uc_"; //Old database prefix

$currentPage = currentPage();

//Check to see if user has a remember me cookie
if(Cookie::exists(Config::get('remember/cookie_name')) && !Session::exists(Config::get('session/session_name'))){
$hash = Cookie::get(Config::get('remember/cookie_name'));
$hashCheck = DB::getInstance()->query("SELECT * FROM users_session WHERE hash = ? AND uagent = ?",array($hash,Session::uagent_no_version()));

if ($hashCheck->count()) {
$user = new User($hashCheck->first()->user_id);
$user->login();

}
}

//Set Time Zone string
//php.net/manual/en/timezones.php
$timezone_string="Africa/Johannesburg";
date_default_timezone_set($timezone_string);

// Adding more ids to this array allows people to access everything, whether offline or not. Use caution.
$master_account = [1];

//Check to see that user is logged in on a temporary password
$user = new User();

//Check to see that user is verified
if($user->isLoggedIn()){
if($user->data()->email_verified == 0 && $currentPage != 'verify.php' && $currentPage != 'logout.php' && $currentPage != 'verify_thankyou.php'){
Redirect::to('users/verify.php');
}
}


  Menus
Posted by: dave3460 - 11-30-2017, 07:17 PM - Forum: UserSpice 4.3 and Below - Replies (3)

Hi the menu system thats been added i had something like that already
But i am looking at using the version thats used .
Can i add a sub sub menu.

I.e
Map
then sub is Location 1

Then a sub sub thats location 1.1

i have been playing with your config on how you have dealt with it i get the sub up but not the sub sub
Any help is gladly looked at


  4.3 Upgrade Question
Posted by: DarrenH - 11-30-2017, 03:57 PM - Forum: UserSpice 4.3 and Below - Replies (3)

Hello, I dragged my 4.2 files into a subfolder and dropped 4.3 into my 'demo' install folder (followed the demo video to the letter!)

Things seem to be working okay after the install, but during the install I got a lot of "Error Performing Query" messages.

Tables were apparently imported successfully.

Is all this safe to ignore? Or is there some issue that will come up as a result of this later? : )

Screenshot here https://imgur.com/a/evCfI

Thanks for your help D


  Page Permission Bug (volatile)
Posted by: sanbuild - 11-30-2017, 02:44 PM - Forum: UserSpice 4.3 and Below - Replies (3)

Hi,
I have a problem similar to topic reply #6796 in that pages are disappearing from the database & admin panel, however this did topic not show the solution.

I have a folder with files, and have added the path, I have been controlling the pages via the page permissions panel in admin ,however the pages are volatile. They can be recorded both in the database and the admin, only to disappear within 15 minutes or several login/out cycles.

I have followed your comments about adding the init/header lines etc & putting the path of the folders in the z_us_root path ,ie

From: Controlled Pages:
<?php //DO NOT DELETE THIS FILE.&
require_once 'users/init.php';
require_once $abs_us_root.$us_url_root.'users/includes/header.php';
require_once $abs_us_root.$us_url_root.'users/includes/navigation.php';
if (!securePage($_SERVER['PHP_SELF'])){die();}

From z_us_root:
$path=['','users/','usersc/','snag1/','snag2/'];
//Only add or remove values in the $path variable separated by commas above


I have seen the pages in the database together with the permissions, and later they disappear my pages db is now showing an id of 302, the id between 77 and 302 have been previously logged and now automatically dropped the data with empty rows.

Any advice appreciated,
Steve


  4.3.8 login.php error (and fix)
Posted by: stowe39 - 11-30-2017, 12:41 AM - Forum: UserSpice 4.3 and Below - Replies (3)

after upgrading to 4.3.8 to fix the notifications issue, the login page didn't work anymore and an error was displayed that said

Code:
Notice: Undefined property: stdClass::$twofa in C:\wamp\www\test\users\login.php on line 169

I had a look at line 169 and it was looking for the variable twofa in the settings table. I added a column for twofa (tinyint) to the settings table and the login works again.

and I know I needed to run users/update.php to fix the problem...but I couldn't run the file without being logged in


  switching index.php
Posted by: dsuggs - 11-29-2017, 04:42 PM - Forum: UserSpice 4.3 and Below - Replies (6)

ok so I wanted to change the index.php file in the root to the index.php in the user folder as it is a redirect page that takes to one page if logged in and to the log in page if they are not this what I want my site to do now when I switched in my site it took and gave me a error 500 I know this is ussually a .htaccess issue but wanted know where do I need the .htaccess file so it will work


  ORM? REST routing?
Posted by: evang - 11-29-2017, 07:57 AM - Forum: New to UserSpice? - Replies (3)

First off, hello from a potential new user, nice to see you.

I have not tried UserSpice yet, still reading about it. I have two initial questions:

1) Is there an ORM provided for the database access? Or, can I integrate an existing one? I was spoiled by Eloquent in the past.

2) How flexible is the routing for creating REST services?

More questions will come.

Thanks!


  US 4.2.11 visiting admin_pages.php Truncates Table
Posted by: Trioxin - 11-29-2017, 04:35 AM - Forum: UserSpice 4.3 and Below - Replies (2)

I have a 4.2.11 install I haven't upgraded yet but without inspecting the later updates I'm willing to bet they would display the same behavior. Whenever an admin visits this page, the pages table gets truncated. I have this site installed to both a dev and production server. The dev version is plaintext code. The production version is encrypted via ioncube and is the version where this happens.

Why would ioncube cause that code block to run against all pages and effectively truncate the pages table? An easy fix?


  Greetings from Budapest
Posted by: klaymen - 11-28-2017, 08:23 AM - Forum: New to UserSpice? - Replies (3)

Hi Everyone,

First of all, greetings from Hungary! Smile
I have discovered UserSpice some weeks ago and I find it is a simple and great framework. Great job everyone!
You can find here my first project using it: http://mk.ladder.spacebar.hu/ (It is a ladder system for a Hungarian card game.)
Feel free to browse the source: https://github.com/klaymen/mk.ladder

Cheers,
Tamás


  Script Visable Assistance requested
Posted by: dsuggs - 11-27-2017, 04:10 PM - Forum: Off-topic Discussions - Replies (1)

During my editing of script and trying to add own flare to the site I ran into an issue with script randomly appearing now this is in a test section does not have the install on it but I am not sure if that is what is causing the issue or not here is what my code currently looks like wondering if there is a little issue that I have that could be causing the issue.

<!DOCTYPE html>

<?php
/*
UserSpice 4
An Open Source PHP User Management System
by the UserSpice Team at http://UserSpice.com

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
// error_reporting(E_ALL);
// ini_set('display_errors', 1);
ini_set("allow_url_fopen", 1);
if(isset($_SESSION)){session_destroy();}
?>
<?php require_once 'init.php'; ?>
<?php require_once $abs_us_root.$us_url_root.'users/includes/header.php'; ?>
<?php require_once $abs_us_root.$us_url_root.'users/includes/navigation.php'; ?>
<?php
$settingsQ = $db->query("SELECT * FROM settings");
$settings = $settingsQ->first();
$error_message = '';
if (@$_REQUEST['err']) $error_message = $_REQUEST['err']; // allow redirects to display a message
$reCaptchaValid=FALSE;

if (Input::exists()) {
$token = Input::get('csrf');
if(!Token::check($token)){
die('Token doesn\'t match!');
}
//Check to see if recaptcha is enabled
if($settings->recaptcha == 1){
require_once 'includes/recaptcha.config.php';

//reCAPTCHA 2.0 check
$response = null;

// check secret key
$reCaptcha = new ReCaptcha($privatekey);

// if submitted check response
if ($_POST["g-recaptcha-response"]) {
$response = $reCaptcha->verifyResponse($_SERVER["REMOTE_ADDR"],$_POST["g-recaptcha-response"]);
}
if ($response != null && $response->success) {
$reCaptchaValid=TRUE;

}else{
$reCaptchaValid=FALSE;
$error_message .= 'Please check the reCaptcha.';
}
}else{
$reCaptchaValid=TRUE;
}

if($reCaptchaValid || $settings->recaptcha == 0){ //if recaptcha valid or recaptcha disabled

$validate = new Validate();
$validation = $validate->check($_POST, array(
'username' => array('display' => 'Username','required' => true),
'password' => array('display' => 'Password', 'required' => true)));

if ($validation->passed()) {
//Log user in

$remember = (Input::get('remember') === 'on') ? true : false;
$user = new User();
$login = $user->loginEmail(Input::get('username'), trim(Input::get('password')), $remember);
if ($login) {
# if user was attempting to get to a page before login, go there
$dest = sanitizedDest('dest');
if (!empty($dest)) {
Redirect::to($dest);
} elseif (file_exists($abs_us_root.$us_url_root.'usersc/scripts/custom_login_script.php')) {

# if site has custom login script, use it
# Note that the custom_login_script.php normally contains a Redirect::to() call
require_once $abs_us_root.$us_url_root.'usersc/scripts/custom_login_script.php';
} else {
if (($dest = Config::get('homepage')) ||
($dest = 'account.php')) {
#echo "DEBUG: dest=$dest<br />\n";
#die;
Redirect::to($dest);
}
}
} else {
$error_message .= 'Log in failed. Please check your username and password and try again.';
}
} else{
$error_message .= '

  • ';
    foreach ($validation->errors() as $error) {
    $error_message .= '
  • ' . $error . '';
    }
    $error_message .= '
';
}
}
}
if (empty($dest = sanitizedDest('dest'))) {
$dest = '';
}

?>

<html>
<head>
<meta charset="UTF-8">
<title>AbsolutAire DASHBOARD</title>



<link rel="stylesheet" href="assets/css/style.css">

</head>
<body>
<hgroup>
<h1>AbsolutAire DASHBOARD</h1>
</hgroup>
<form name="login" class="form-signin" action="login.php" method="post">
<h2 class="form-signin-heading"></i> <?=lang("SIGNIN_TITLE","");?></h2>
<input type="hidden" name="dest" value="<?= $dest ?>" />

<div class="form-group">
<input class="form-control" type="text" name="username" id="username" placeholder="Username/Email" required autofocus>
</div>

<div class="form-group">
<input type="password" class="form-control" name="password" id="password" placeholder="Password" required autocomplete="off">
</div>
<div class="form-group">
<div class="form-group">
</div>

<input type="hidden" name="csrf" value="<?=Token::generate(); ?>">
<button class="submit btn btn-primary" type="submit"><i class="fa fa-sign-in"></i> <?=lang("SIGNIN_BUTTONTEXT","");?>Sign In</button>

</form>

</body>
</html>
<!-- footers -->
<?php require_once $abs_us_root.$us_url_root.'users/includes/page_footer.php'; // the final html footer copyright row + the external js calls ?>

<!-- Place any per-page javascript here -->
<script src="assets/js/index.js"></script>
<?php require_once $abs_us_root.$us_url_root.'users/includes/html_footer.php'; // currently just the closing /body and /html ?>