summaryrefslogtreecommitdiffstats
path: root/php/environs/lasso_profile.c
diff options
context:
space:
mode:
Diffstat (limited to 'php/environs/lasso_profile.c')
-rw-r--r--php/environs/lasso_profile.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/php/environs/lasso_profile.c b/php/environs/lasso_profile.c
index 1b631f96..da87a8e3 100644
--- a/php/environs/lasso_profile.c
+++ b/php/environs/lasso_profile.c
@@ -368,3 +368,29 @@ PHP_FUNCTION(lasso_profile_get_nameidentifier) {
RETURN_STRING(ctx->nameIdentifier, 1);
}
/* }}} */
+
+/* {{{ proto lasso_profile_set_identity_from_dump(resource login, string dump) */
+PHP_FUNCTION(lasso_profile_set_identity_from_dump) {
+
+ LassoProfile *ctx;
+ char *dump;
+ int dump_len;
+
+ zval *parm;
+
+ int num_args;
+ int ret;
+
+ if ((num_args = ZEND_NUM_ARGS()) != 2)
+ WRONG_PARAM_COUNT
+
+ if (zend_parse_parameters(num_args TSRMLS_CC, "zs", &parm,
+ &dump, &dump_len) == FAILURE) {
+ return;
+ }
+
+ ZEND_FETCH_RESOURCE(ctx, LassoProfile *, &parm, -1, le_lassoprofile_name, le_lassoprofile);
+
+ lasso_profile_set_identity_from_dump(ctx, dump);
+}
+/* }}} */