|
|
|
File: c:/web/jpeto2/jpeto/jpeto_user.php
JPETo - James's Publishing & Editing Tool - jpeto_objects
jpeto_user
jpeto_user
This class provides the user object and holds basic information like
|
private class jpeto_user
This class provides the user object and holds basic information like
UserID, Password, Email Address, Creation Date, isEnabled (Status), AccesslevelAll other informations are handled by jpeto_userprofile
|
| |
|
|
|
|
|
|
|
|
|
Public Method Details |
jpeto_user |
|
public void jpeto_user( )
|
| |
Constructor for jpeto_user
|
| Returns |
void |
|
doLogon |
|
public boolean doLogon( string $UserID, string $Password )
|
| |
tries to logon the specified user with the specified password
if successful, the complete userdata is mapped to the user objectand the LastLogon field is updated
|
| Parameter |
|
|
|
|
| Returns |
boolean $success |
|
get_jpeto_user |
|
public void get_jpeto_user( int $UserID )
|
| |
Gets one user entry identified by it's UserID
and calls mapFields
|
| Parameter |
|
| int |
$UserID |
|
|
the UserID of the user to fetch from the database |
|
| Returns |
void |
|
get_next_jpeto_user |
|
public boolean get_next_jpeto_user( [ integer $AccessLevel ] )
|
| |
Gets the next user entry for the defined AccessLevel
|
| Parameter |
|
| integer |
$AccessLevel |
= >>-1<< |
|
|
|
| Returns |
boolean true if there is a next user element
false if there is no next user element
example
while($user->get_next_jpeto_user())
{
$user->toHTML();
} |
|
newUserID |
|
public string newUserID( string $UserID )
|
| |
gets an unused UserID
|
| Parameter |
|
|
| Returns |
string $UserID |
|
isAvailable |
|
public boolean isAvailable( string $UserID )
|
| |
returns if an UserID is available (=true) or not (=false)
|
| Parameter |
|
|
| Returns |
boolean $isAvailable |
|
toHTML |
|
public string toHTML( )
|
| |
returns a HTML formatted user
|
| Returns |
string $user |
|
disable |
|
public boolean disable( string $UserID )
|
| |
disables a user account
|
| Parameter |
|
|
| Returns |
boolean $success |
|
enable |
|
public boolean enable( string $UserID )
|
| |
enables a user account
|
| Parameter |
|
|
| Returns |
boolean $success |
|
delete |
|
public boolean delete( string $UserID )
|
| |
deletes a user account
|
| Parameter |
|
|
| Returns |
boolean $success |
|
store |
|
public boolean store( )
|
| |
stores the current user
|
| Returns |
boolean $success |
|
|
Private Method Details |
getGroups |
|
private array getGroups( string $UserID )
|
| |
Gets all the IDs of the Groups this user is member of
|
| Parameter |
|
|
| Returns |
array $Groups |
|
isMemberOf |
|
private boolean isMemberOf( string $GroupID )
|
| |
Returns true if current user is member of given Group
|
| Parameter |
|
|
| Returns |
boolean $isMemberOf |
|
mapFields |
|
private void mapFields( array $Recordset )
|
| |
Maps the fields of the given recordset to the
class variables
|
| Parameter |
|
| array |
$Recordset |
|
|
the Recordset given to map to the variables |
|
| Returns |
void |
|
newPassword |
|
private string newPassword( [ Integer $size ] )
|
| |
creates a new password
|
| Parameter |
|
| Integer |
$size |
= >>6<< |
|
(the length of the password) |
|
| Returns |
string $Password |
|
debug |
|
private void debug( )
|
| |
returns the elements of the object as a html table
overwrite function debugObject in extending class
|
| Returns |
void |
|
getUserName |
|
private String getUserName( )
|
| |
gets the name of the current user
|
| Returns |
String $username |
|
getDefaultValues |
|
private void getDefaultValues( )
|
| |
gets default Values for (not set) parameters
|
| Returns |
void |
|
|
Private Field Details |
$JpetoType |
|
private string $JpetoType
>>"jpeto_user"<<
Type of current element
|
|
$Interface |
|
private string $Interface
>>"jpeto_user.php"<<
Name of the (Admin-) interface file
|
|
$j_UserID |
|
private string $j_UserID
>>""<<
current UserID
|
|
$j_Password |
|
private string $j_Password
>>""<<
current encoded Password
|
|
$j_Email |
|
private string $j_Email
>>""<<
current Email
|
|
$j_DateCreated |
|
private string $j_DateCreated
>>""<<
Date of account-creation
|
|
$j_isEnabled |
|
private boolean $j_isEnabled
>>false<<
Useraccount enabled / locked
|
|
$j_AccessLevel |
|
private integer $j_AccessLevel
>>1<<
AccessLevel of current User (0=normal user, 10=super user)
|
|
$j_FirstName |
|
private string $j_FirstName
>>""<<
current FirstName
|
|
$j_LastName |
|
private string $j_LastName
>>""<<
current LastName
|
|
$j_Language |
|
private string $j_Language
>>"DE"<<
language of current element (2 character language code, default "DE")
|
|
$UserData |
|
private string $UserData
>>""<<
Data of current User
|
|
$j_LastLogon |
|
private string $j_LastLogon
>>""<<
Last Logon Date
|
|
$j_PlainPassword |
|
private string $j_PlainPassword
>>""<<
current plain text Password
|
|
$Recordset |
|
private array $Recordset
>>array()<<
resultset of the query
|
|
$Pointer |
|
private integer $Pointer
>><<
pointer in $Recordset
|
|
$ExtraQuery |
|
private string $ExtraQuery
>>""<<
Extra Query String
|
|
$StyleClass |
|
private string $StyleClass
>>""<<
Stylesheet class-name for HTML design
|
|
$Profile |
|
private array $Profile
>>array()<<
Array that holds the Userprofile-Data
|
|
$Group |
|
private array $Group
>>array()<<
Array that holds the Groups in which the current user is a member of
|
|
|
|
|
|
|
|
| PHPDoc 1.0beta |