API: Allow renewal of membership with upcoming expiry

This commit is contained in:
nikolark committed 2015-08-18 22:35:29 +02:00
1 parent f2bd23efad
commit f33ffa23df
2 files changed
+10 -9

No files matched your search

+1 -1
View File
@@ -267,7 +267,7 @@ function add_or_renew_membership($user_id, $purchased=NULL) {
/* Membership expiry */
/* One year from today (default) */
if( $purchased == NULL ) {
if( $purchased == NULL || $purchased === false) {
$purchased = date_create();
}
/* ...or one year from specified date */