11-03-2016, 07:28 PM
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></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)
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
)
);
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)