summaryrefslogtreecommitdiff
path: root/ext/session/mod_user_class.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/session/mod_user_class.c')
-rw-r--r--ext/session/mod_user_class.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/ext/session/mod_user_class.c b/ext/session/mod_user_class.c
index 419fd03f61..328416c02e 100644
--- a/ext/session/mod_user_class.c
+++ b/ext/session/mod_user_class.c
@@ -155,3 +155,37 @@ PHP_METHOD(SessionHandler, create_sid)
RETURN_STR(id);
}
/* }}} */
+
+/* {{{ proto char SessionUpdateTimestampHandler::validateId(string id)
+ Simply return TRUE */
+PHP_METHOD(SessionHandler, validateId)
+{
+ zend_string *key;
+
+ PS_SANITY_CHECK_IS_OPEN;
+
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "S", &key) == FAILURE) {
+ return;
+ }
+
+ /* Legacy save handler may not support validate_sid API. Return TRUE. */
+ RETURN_TRUE;
+}
+/* }}} */
+
+/* {{{ proto bool SessionUpdateTimestampHandler::updateTimestamp(string id, string data)
+ Simply call update_timestamp */
+PHP_METHOD(SessionHandler, updateTimestamp)
+{
+ zend_string *key, *val;
+
+ PS_SANITY_CHECK_IS_OPEN;
+
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "SS", &key, &val) == FAILURE) {
+ return;
+ }
+
+ /* Legacy save handler may not support update_timestamp API. Just write. */
+ RETVAL_BOOL(SUCCESS == PS(default_mod)->s_write(&PS(mod_data), key, val));
+}
+/* }}} */