[geeklog-cvs] Auth_Enterprise/Enterprise Server.php,1.1,1.2
jellybob at iowaoutdoors.org
jellybob at iowaoutdoors.org
Thu Jul 8 11:22:10 EDT 2004
Update of /var/cvs/Auth_Enterprise/Enterprise
In directory www:/tmp/cvs-serv1004/Enterprise
Modified Files:
Server.php
Log Message:
Added an isAuthenticated method to get the currently authenticated user.
Index: Server.php
===================================================================
RCS file: /var/cvs/Auth_Enterprise/Enterprise/Server.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Server.php 8 Jul 2004 14:36:16 -0000 1.1
--- Server.php 8 Jul 2004 15:22:07 -0000 1.2
***************
*** 44,53 ****
/**
! * User authentication can be fired multiple times for the same user which would be inefficient.
! * This attribute indicates if the user has been authenticated to save on these extra calls
! * @access protected
! * @var boolean
! */
! protected $isAuthenticated = false;
/**
--- 44,53 ----
/**
! * An authenticated user object can be stored here for times when it's needed.
! *
! * @access protected
! * @var Auth_Enterprise_ServiceUser
! */
! protected $authenticatedUser = null;
/**
***************
*** 78,81 ****
--- 78,97 ----
/**
+ * Checks if a user is currently authenticated.
+ *
+ * @author Jon Wood <jon at jellybob.co.uk>
+ * @return false|Auth_Enterprise_ServiceUser
+ * @access public
+ */
+ public function &isAuthenticated()
+ {
+ if (isset($this->authenticatedUser)) {
+ return $this->authenticatedUser;
+ }
+
+ return false;
+ }
+
+ /**
* Registers a new account with the service
*
More information about the geeklog-cvs
mailing list