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
/showthread.php 28 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!

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Hi from Martijn
#1
I'm going to create a cloud storage solution for the pictosheets in Picto-Selector (a Windows application) and for this I need a user management system (user creation and verification) and UserSpice seems to be right what I need.

I've created the following template for my commands:

<pre>
Code:
<?php

require_once '../users/init.php';

$username = Input::get('username');
$password = Input::get('password');

$status = '';
$error_message = '';
$result = array();

if( $user->login($username, $password) ) {
    $result['test'] = 'This is a positive result';
    $status = 'ok';
    $error_message = '';
} else {
    $status = 'error';
    $error_message = 'Invalid username and password.';
}

header('Content-type: application/json');
echo json_encode(
    array(
        'result' => $result,
        'status' => $status,
        'error_message' => $error_message
    )
);
</pre>




The only change I needed to get 'clean' json back was to comment this line in us_helpers.php (because it was including a empty script tag from analytics:
//require_once $abs_us_root.$us_url_root.'usersc/includes/analytics.php';

So far it is very promising, thanks for creating this :-)

You can find Picto-Selector on www.pictoselector.eu (Freeware Windows application and a Wine wrapper for MacOS)
  Reply
#2
Just a note...I fixed this in 4.1.8.c. You can grab the update from the updates tab at the top of the page.
  Reply
#3
Just a note...I fixed this in 4.1.8.c. You can grab the update from the updates tab at the top of the page.
  Reply
#4
Some files and folder names have changed, but the idea is still the same. As long as you have the "init.php" properly included and that securePage function in there and your page ends with a .php extension, userspice will fully work. You don't really need any of the other stuff.
  Reply
#5
Hi,

Currently the website is working very nicely at: https://picto.cloud/ (the application using the webservice is not online yet)
It is based on userspice 4.1 which was a nice start. I'm changing a lot of code to my own needs, so updating is not really possible. I will have to do that manually by comparing changes in new versions.

That's ok with me. I just want to repeat my thanks :-)

Kind regards,
Martijn
  Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)