I realize I have been taking my time with SamTodo 1.2, so here is a little something you can do until multi-user support becomes native.
Note: Please backup everything (including your database) before trying this!
STEP 1
EDIT _model\global\act_config.php
Add an $account_name2, and $account_password2 underneath the originals so it looks something like this:
|
|
// SamTodo login information
$account_name = "sam";
$account_password = "password";
$account_name2 = "sam2";
$account_password2 = "password2"; |
STEP 2
EDIT _model\account\act_login.php
Change line 13 to 25 from:
|
|
if(($_REQUEST["accountName"] == $account_name) && ($_REQUEST["accountPassword"] == $account_password)) {
// establish their ID and name as session variables for use elsewhere
$_SESSION["accountID"] = "00000000-0000-0000-0000-000000000000"; // account ID's will be used in a later release
$_SESSION["accountName"] = $account_name;
// redirect to main
header( "Location: " . $root_path . "main.default" );
}
else
{
$error = 1;
} |
To:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
|
if(($_REQUEST["accountName"] == $account_name) && ($_REQUEST["accountPassword"] == $account_password)) {
// establish their ID and name as session variables for use elsewhere
$_SESSION["accountID"] = "00000000-0000-0000-0000-000000000000"; // account ID's will be used in a later release
$_SESSION["accountName"] = $account_name;
// redirect to main
header( "Location: " . $root_path . "main.default" );
}
elseif (($_REQUEST["accountName"] == $account_name2) && ($_REQUEST["accountPassword"] == $account_password2)) {
// establish their ID and name as session variables for use elsewhere
$_SESSION["accountID"] = "00000000-0000-0000-0000-000000000001"; // account ID's will be used in a later release
$_SESSION["accountName"] = $account_name2;
// redirect to main
header( "Location: " . $root_path . "main.default" );
}
else
{
$error = 1;
} |
Continue reading →