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


Messages In This Thread
Hi from Martijn - by mcvanderkooij - 11-03-2016, 07:28 PM
Hi from Martijn - by mudmin - 11-12-2016, 02:50 PM
Hi from Martijn - by mudmin - 11-12-2016, 02:50 PM
Hi from Martijn - by mudmin - 11-12-2016, 02:52 PM
Hi from Martijn - by mcvanderkooij - 12-03-2016, 10:33 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)