Within webforms the $_SERVER and $_GET variables can be used to create things. I am requesting that $_SESSION be added to that allowed list. Towards that end I have attached a patch that I believe adds that functionality. Thank you for your consideration.

Comments

antgiant’s picture

Title: Allow $_SESSION variable to be used » Perhaps $_COOKIE too
StatusFileSize
new2.47 KB

Since I'm requesting $_SESSION it seems to make sense to add $_COOKIE as well. So I have attached a patch that adds both to the current HEAD. However, I would much rather have just $_SESSION if forced to choose between them. Again thank you for your consideration.

antgiant’s picture

Title: Perhaps $_COOKIE too » Allow $_SESSION variable to be used & Perhaps $_COOKIE too

Changing title back. Sorry I'm new to this comment system.

antgiant’s picture

Status: Needs review » Reviewed & tested by the community

Patch is still good any interest in adding?

jugglerpm’s picture

I'm interested in this patch being implemented. It would help our projects.

designerbrent’s picture

+2 for this. This would be very helpful!

quicksketch’s picture

Status: Reviewed & tested by the community » Fixed
StatusFileSize
new4.29 KB

Thanks, this is a great suggestion. While the patch submitted is totally fine, I made some changes to cut down on the number of copy/pasted lines of code and just put everything into a single loop. While we're at it, I also added $_REQUEST along with $_SESSION and $_COOKIE. The end result is a more efficient and flexible.

I went ahead and committed the attached patch. Thanks for everything antgiant!

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.