$_SESSION data?

McMurryIAS
McMurryIAS's picture

Joined: 2009-12-01
Posts: 63
Posted: Tue, 2009-12-08 20:41

I am trying to examine the $_SESSION array in RestrictKeywordsOption.inc, as I wish to modify that file to send an email list of files which failed to upload due to $forceKeywords being true and $keywords being empty. The reason for examining the $_SESSION array is that I assume it contains info about the person who is attempting the upload, such as name, email, etc.

However when I print_r( $_SESSION ) it is empty.

1) If $_SESSION is the appropriate place to check, how do I access it within the Gallery paradigm?

2) If $_SESSION is not the place to check, what object/method/other place should I access/check for that type of data?

Gallery System Info
----------------------
Gallery version = 2.3 core 1.3.0
API = Core 7.54, Module 3.9, Theme 2.6, Embed 1.5
PHP version = 5.2.6-2ubuntu4.3 cgi-fcgi
Webserver = lighttpd/1.4.19
Database = mysqli 5.0.67-0ubuntu6, lock.system=flock
Toolkits = Dcraw, Exif, Ffmpeg, Getid3, jpegtran, NetPBM, Thumbnail, Gd, ImageMagick
Acceleration = full/86400, full/86400
Operating system = Linux atropos 2.6.27-14-server #1 SMP Tue Jun 30 20:34:56 UTC 2009 x86_64
Default theme = mcmurry
gettext = enabled
Locale = en_US
Browser = Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; InfoPath.1)
Rows in GalleryAccessMap table = 70
Rows in GalleryAccessSubscriberMap table = 61834
Rows in GalleryUser table = 109
Rows in GalleryItem table = 61809
Rows in GalleryAlbumItem table = 559
Rows in GalleryCacheMap table = 5002
-----
http://www.mcmurry.com

 
McMurryIAS
McMurryIAS's picture

Joined: 2009-12-01
Posts: 63
Posted: Tue, 2009-12-08 20:43

p.s. - Also access the album info from that file. (To indicate where the uploads were attempted to ...)
-----
http://www.mcmurry.com

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Tue, 2009-12-08 21:25

G2 doesn't use php session handling at all, excepting the initial install process.

You can use things like $gallery->getActiveUser() to find out who the current user is
http://gallery.menalto.com/apidoc/GalleryCore/Classes/Gallery.html#methodgetActiveUser

obviously if they're the anonymous user (guest) then you won't have an email on record.

 
McMurryIAS
McMurryIAS's picture

Joined: 2009-12-01
Posts: 63
Posted: Wed, 2009-12-09 13:32

grazie!
-----
http://www.mcmurry.com