Clean up Synchronet account creation
This commit is contained in:
parent
aac00ec3e5
commit
29528981d4
@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
// setcookie("ts_limit",4096,time()+(3600*24*30),"/");
|
// setcookie("ts_limit",4096,time()+(3600*24*30),"/");
|
||||||
include "config.inc.php";
|
include "config.inc.php";
|
||||||
|
include $config_dir.'/synchronet.conf';
|
||||||
include "head.inc";
|
include "head.inc";
|
||||||
$CONFIG = include($config_file);
|
$CONFIG = include($config_file);
|
||||||
$workpath = $config_dir."users/";
|
$workpath = $config_dir."users/";
|
||||||
@ -12,7 +13,6 @@
|
|||||||
$userFilename = $workpath.$username;
|
$userFilename = $workpath.$username;
|
||||||
$keyFilename = $keypath.$username;
|
$keyFilename = $keypath.$username;
|
||||||
@mkdir($workpath.'new/');
|
@mkdir($workpath.'new/');
|
||||||
$tmpFilename = $workpath."new/".$username;
|
|
||||||
$verified = 0;
|
$verified = 0;
|
||||||
|
|
||||||
$no_verify=explode(' ', $CONFIG['no_verify']);
|
$no_verify=explode(' ', $CONFIG['no_verify']);
|
||||||
@ -42,14 +42,10 @@
|
|||||||
fclose($userFileHandle);
|
fclose($userFileHandle);
|
||||||
chmod($userFilename, 0666);
|
chmod($userFilename, 0666);
|
||||||
}
|
}
|
||||||
if(isset($synch_create) && $synch_create === true) {
|
// Create synchronet account
|
||||||
$result = shell_exec('/sbbs/rscreate/createbbsuser '.$username.' '.$password);
|
if(isset($synch_create) && $synch_create == true) {
|
||||||
}
|
putenv("SBBSCTRL=$synch_path/ctrl");
|
||||||
if ($userFileHandle = @fopen($tmpFilename, 'w+'))
|
$result = shell_exec("$synch_path/exec/makeuser $username -P $password");
|
||||||
{
|
|
||||||
fwrite($userFileHandle, $password);
|
|
||||||
fclose($userFileHandle);
|
|
||||||
chmod($tmpFilename, 0666);
|
|
||||||
}
|
}
|
||||||
$newkey = make_key($username);
|
$newkey = make_key($username);
|
||||||
if ($userFileHandle = @fopen($keyFilename, 'w+'))
|
if ($userFileHandle = @fopen($keyFilename, 'w+'))
|
||||||
|
9
Rocksolid_Light/rslight/synchronet.conf
Normal file
9
Rocksolid_Light/rslight/synchronet.conf
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<?php
|
||||||
|
/* This is the configuration file for integration with Synchronet
|
||||||
|
* If you wish to create synchronet accounts from rslight,
|
||||||
|
* synchronet (sbbs) and your web user must match.
|
||||||
|
* You can change synchronet user/group in $synch_path/ctrl/sbbs.ini
|
||||||
|
*/
|
||||||
|
$synch_create = '1';
|
||||||
|
$synch_path = '/sbbs/';
|
||||||
|
?>
|
Loading…
x
Reference in New Issue
Block a user