06-05-2016, 02:25 PM
Hi, let me start by saying thanks for UserSpice! I used usercake 1.x a few years back for a project and that led me to this new and improved version.
I installed latest 4.1 ($user_spice_ver="Version 4.1.2") on Ubuntu 16.04LTS LAMP. The installation went ok, no errors, but here is what I got when trying to access the page:
Parse error: syntax error, unexpected '=>' (T_DOUBLE_ARROW) in /var/www/html/S2S_DEV1/users/init.php on line 95
Dug around the init.php file and editor was reporting a syntax error on line 95:
//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('verify.php');
}
}'host' => '192.168.xxx.xxx',
'username' => 'xxxxx',
'password' => 'xxxxx',
'db' => 'S2SDB_DEV1',
),
'remember' => array(
'cookie_name' => 'yyyyyyyyyyyyy',
'cookie_expiry' => 604800 //One week, feel free to make it longer
),
'session' => array(
'session_name' => 'user',
'token_name' => 'token',
)
);
I looked around some of the code on github and playing around with some of the code was able to change it to this:
//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('verify.php');
}
};
$GLOBALS['config'] = array(
'mysql' => array(
'host' => '192.168.xxx.xxx',
'username' => 'xxxxx',
'password' => 'xxxxx',
'db' => 'S2SDB_DEV1',
),
'remember' => array(
'cookie_name' => 'yyyyyyyyyyy',
'cookie_expiry' => 604800 //One week, feel free to make it longer
),
'session' => array(
'session_name' => 'user',
'token_name' => 'token',
)
);
Now, that seems to fix the problem as everything works after that but I have not looked at the code enough to call it a fix. I'm not 100{3bc1fe685386cc4c3ab89a3f76566d8931e181ad17f08aed9ad73b30bf28114d} sure of what I did there so can you guys confirm if that is indeed the missing piece?
Thanks again!
I installed latest 4.1 ($user_spice_ver="Version 4.1.2") on Ubuntu 16.04LTS LAMP. The installation went ok, no errors, but here is what I got when trying to access the page:
Parse error: syntax error, unexpected '=>' (T_DOUBLE_ARROW) in /var/www/html/S2S_DEV1/users/init.php on line 95
Dug around the init.php file and editor was reporting a syntax error on line 95:
//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('verify.php');
}
}'host' => '192.168.xxx.xxx',
'username' => 'xxxxx',
'password' => 'xxxxx',
'db' => 'S2SDB_DEV1',
),
'remember' => array(
'cookie_name' => 'yyyyyyyyyyyyy',
'cookie_expiry' => 604800 //One week, feel free to make it longer
),
'session' => array(
'session_name' => 'user',
'token_name' => 'token',
)
);
I looked around some of the code on github and playing around with some of the code was able to change it to this:
//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('verify.php');
}
};
$GLOBALS['config'] = array(
'mysql' => array(
'host' => '192.168.xxx.xxx',
'username' => 'xxxxx',
'password' => 'xxxxx',
'db' => 'S2SDB_DEV1',
),
'remember' => array(
'cookie_name' => 'yyyyyyyyyyy',
'cookie_expiry' => 604800 //One week, feel free to make it longer
),
'session' => array(
'session_name' => 'user',
'token_name' => 'token',
)
);
Now, that seems to fix the problem as everything works after that but I have not looked at the code enough to call it a fix. I'm not 100{3bc1fe685386cc4c3ab89a3f76566d8931e181ad17f08aed9ad73b30bf28114d} sure of what I did there so can you guys confirm if that is indeed the missing piece?
Thanks again!