![]() |
New Feature "User Group" Expire
Hi ALL
What I'm looking for is expire feature. Two Fields would need to be added to user database "Expire_Date" and "Expire_to_group" When setting up new user, set "User Group", Set "Expire_to_date" and "Expire_to_group" Every time user visits site, expire date is checked against current date, if current date <= expire date then "User Group" is changed to value of "Expire_to_group" Anyone up to the task? MagNaMan |
Does anyone know if something like this already exists?
|
hmmm, i wouldnt mind this hack either......i dont know if i can build it but
|
well here's sql code to create extra fields
alter table `user` add column usergroupexpire date not null default '00/00/00' after usergroupid, add column usergroupexpireid int(5) unsigned not null default 0 after usergroupexire, type=myISAM |
When a person first visits bulletin, where is the best place to put code to check?
And change usergroup, etc before completing login |
I was thinking more along the line of a premium paid usergroup, when the 12 month period has expired then they will be automaticly downgraded to a lower level (admin set) usergroup. that way i dont have to keep checking manually....maybe an auto pm to member and admin informing them of the downgrade would also be an advantage.
|
Yep.. Quit reading my mind :)
|
So anyone got an idea where I can place code?
I need to know where is a good place to put it. I'm assuming where cookies are read or something like that. |
ive got an idea where to put the code ..... but no idae how to code it.....
|
I can start this hack...
Requires a new column in user table called memexpire When a member is shifted to the nominated premium user group the date of upgrade will be added to this column.....thats the easy part...... However I have no idea how to code the script to automaticly down grade them at the end of a 12 month period and pm'ing both the member and the admin upon this action. Not sure but would it be better to add date plus 12 months upon upgradeing to the memexpire column.....not sure how this is done either but when i get time i will have a play with some coding. |
Hmm. I would guess the best place to check for auto-expiring would be during the login, where the username and password is entered. Also would need during cookie lookup, if user is using cookies.
|
Quote:
I can use this as well! :banana: |
Could use here as well.
|
OK OK, I have not had time to look into this any further, however Since i realy need this hack, it look like im going to have to force myself to learn more to build the hack..... give me a week or so as i have other projects to complete
|
I have this running once a month with a cronjob in case you want some inspiration:
PHP Code:
|
Nick, I need all the inspriation that i can get .... lol
looking at the code, Ihis is now an automated process ???? I presume that you have to activate it via a link in the admin panel. If i added similar code to the admin/user.php, this will check the paid members current status each time they view a page or visit the site. I spost that it would add an extra quriy for paid membeers , this would not be so bad. i would have to add a second column to the user table so when the expired membersship code is activated, it sets the value to "1" that tells the script next time around that the email has already been sent. Will that work?? |
sorry the code would have to go in the admin/functions.php.........right???
|
Actually, mine's just in the root vB folder (doesn't pose a security threat), and it simply runs via a cronjob once per month.
|
any progress on a full hack for this yet?
|
there can be security holes in cron jobs, make sure the script has security measures.
|
All times are GMT. The time now is 02:41 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|