<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://ark.lparchaeology.com/wiki/index.php?action=history&amp;feed=atom&amp;title=Accessing_User_Information</id>
		<title>Accessing User Information - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://ark.lparchaeology.com/wiki/index.php?action=history&amp;feed=atom&amp;title=Accessing_User_Information"/>
		<link rel="alternate" type="text/html" href="https://ark.lparchaeology.com/wiki/index.php?title=Accessing_User_Information&amp;action=history"/>
		<updated>2026-05-18T09:18:14Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.27.1</generator>

	<entry>
		<id>https://ark.lparchaeology.com/wiki/index.php?title=Accessing_User_Information&amp;diff=2162&amp;oldid=prev</id>
		<title>Guy at 17:16, 26 February 2009</title>
		<link rel="alternate" type="text/html" href="https://ark.lparchaeology.com/wiki/index.php?title=Accessing_User_Information&amp;diff=2162&amp;oldid=prev"/>
				<updated>2009-02-26T17:16:43Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&#039;diff-marker&#039; /&gt;
				&lt;col class=&#039;diff-content&#039; /&gt;
				&lt;col class=&#039;diff-marker&#039; /&gt;
				&lt;col class=&#039;diff-content&#039; /&gt;
				&lt;tr style=&#039;vertical-align: top;&#039; lang=&#039;en&#039;&gt;
				&lt;td colspan=&#039;2&#039; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&#039;2&#039; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 17:16, 26 February 2009&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l37&quot; &gt;Line 37:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 37:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; $cre_by = $_SESSION[&amp;#039;user_id&amp;#039;];&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; $cre_by = $_SESSION[&amp;#039;user_id&amp;#039;];&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category: Developer]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Guy</name></author>	</entry>

	<entry>
		<id>https://ark.lparchaeology.com/wiki/index.php?title=Accessing_User_Information&amp;diff=686&amp;oldid=prev</id>
		<title>Guy at 17:02, 26 February 2009</title>
		<link rel="alternate" type="text/html" href="https://ark.lparchaeology.com/wiki/index.php?title=Accessing_User_Information&amp;diff=686&amp;oldid=prev"/>
				<updated>2009-02-26T17:02:38Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;The auth scripts make several pieces of information about the currect user available as session variables. Ideally you should make use of any live versions of this information rahter than pulling them fresh from the session over and over again.&lt;br /&gt;
&lt;br /&gt;
==The session variables==&lt;br /&gt;
&lt;br /&gt;
The session variables are saved by the auth script when the user logs in. The variables are:&lt;br /&gt;
&lt;br /&gt;
#$_SESSION[&amp;#039;user_id&amp;#039;]&lt;br /&gt;
#$_SESSION[&amp;#039;soft_name&amp;#039;]&lt;br /&gt;
#$_SESSION[&amp;#039;sgrp_arr&amp;#039;]&lt;br /&gt;
#$_SESSION[&amp;#039;loginIPAddress&amp;#039;]&lt;br /&gt;
&lt;br /&gt;
Bear in mind that as these are saved to the session by the authenticate.php script, this script will need to be rerun in order to force a reload of these variables, therefore any edits made to the user&amp;#039;s profile will not be loaded intot eh session until they log out and login again.&lt;br /&gt;
&lt;br /&gt;
===user_id===&lt;br /&gt;
&lt;br /&gt;
This is the id of the user, ie the id from the table cor_tbl_people.&lt;br /&gt;
&lt;br /&gt;
===soft_name===&lt;br /&gt;
&lt;br /&gt;
This is a concatenation of the firstname and lastname fields. The two fields are seperated with a space.&lt;br /&gt;
&lt;br /&gt;
===sgrp_arr===&lt;br /&gt;
&lt;br /&gt;
This is an array of the sgrps to which the user belongs.&lt;br /&gt;
&lt;br /&gt;
==Live variables==&lt;br /&gt;
&lt;br /&gt;
Where possible try to make use of the previously called live variables rather than making fresh variables and making new calls to the session. This is not a major performance worry, but it is to avoid general code untidiness that will be hard to remove in the future.&lt;br /&gt;
&lt;br /&gt;
===cre_by and cre_on===&lt;br /&gt;
&lt;br /&gt;
One of the most important uses of the current user information is the cre_by variable which is used to record who created a particular record. This var is called from the session and made live by the process script. Generally it is inadvisable to make calls to the live var as it may have been altered to fit a particular update query or it may only be set under certain conditions.&lt;br /&gt;
&lt;br /&gt;
Bear in mind that this is the user&amp;#039;s ID number.&lt;br /&gt;
&lt;br /&gt;
In order to create a cre_by use the following code:&lt;br /&gt;
&lt;br /&gt;
  $cre_by = $_SESSION[&amp;#039;user_id&amp;#039;];&lt;/div&gt;</summary>
		<author><name>Guy</name></author>	</entry>

	</feed>