MyBB Community Forums

Full Version: MySubscriptions pause subscription
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello, I'm looking for a way to temporary pause my users from being accessed to a specified user group and then restore it back after some time, so users won't lose their days after service were down. I can see there is notification tab in settings, but does it let me to control subs or it's just a notification (don't have any active sub yet, so can't really test it)?

In case I will disable active sub, does my vip users lose their days while it was disabled?
Where it stores expiration date? I would like to add days for specified user :/

edit: please help!
If you are using MySubscriptions 2, use this:

$gettime = htmlspecialchars($_GET['gettime']);
$username = htmlspecialchars($_GET['username']);

$gettimetoadd = $gettime.' days';
$timetoadd = strtotime($gettimetoadd, 0);

$query_0 = $db->query("SELECT * FROM mybb_users WHERE username = '$username'");
$list_result_0 = mysqli_fetch_assoc($query_0);
	
$userid = $list_result_0["uid"];
	
$query_1 = $db->query("SELECT * FROM mybb_mysubs_notifs WHERE uid = '$userid' AND active = 1");
$list_result_1 = mysqli_fetch_assoc($query_1);
	
$userexpiration = $list_result_1["expiration"];
	
$newtimeadd = $userexpiration + $timetoadd;

$query = $db->query("UPDATE mybb_mysubs_notifs SET expiration = '$newtimeadd' WHERE uid = '$userid' AND active = 1");
	
echo "Added.".$gettime."day (s)";

xDead here, you asked for help on my site but did not answer my message Wink

(example code, it works but you should improve it)

I suggest you do a panel, it's much easier.

[Image: Yj7VsDI.png]