Packageindex Classtrees Modulegroups Elementlist Report XML Files

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 Summary

void

jpeto_user()

Constructor for jpeto_user
boolean

doLogon(string $UserID, string $Password)

tries to logon the specified user with the specified password
void

get_jpeto_user(int $UserID)

Gets one user entry identified by it's UserID
boolean

get_next_jpeto_user([ integer $AccessLevel ])

Gets the next user entry for the defined AccessLevel
string

newUserID(string $UserID)

gets an unused UserID
boolean

isAvailable(string $UserID)

returns if an UserID is available (=true) or not (=false)
string

toHTML()

returns a HTML formatted user
boolean

disable(string $UserID)

disables a user account
boolean

enable(string $UserID)

enables a user account
boolean

delete(string $UserID)

deletes a user account
boolean

store()

stores the current user

Private Method Summary

array

getGroups(string $UserID)

Gets all the IDs of the Groups this user is member of
boolean

isMemberOf(string $GroupID)

Returns true if current user is member of given Group
void

mapFields(array $Recordset)

Maps the fields of the given recordset to the
string

newPassword([ Integer $size ])

creates a new password
void

debug()

returns the elements of the object as a html table
String

getUserName()

gets the name of the current user
void

getDefaultValues()

gets default Values for (not set) parameters

Private Field Summary

string

$JpetoType

Type of current element
string

$Interface

Name of the (Admin-) interface file
string

$j_UserID

current UserID
string

$j_Password

current encoded Password
string

$j_Email

current Email
string

$j_DateCreated

Date of account-creation
boolean

$j_isEnabled

Useraccount enabled / locked
integer

$j_AccessLevel

AccessLevel of current User (0=normal user, 10=super user)
string

$j_FirstName

current FirstName
string

$j_LastName

current LastName
string

$j_Language

language of current element (2 character language code, default "DE")
string

$UserData

Data of current User
string

$j_LastLogon

Last Logon Date
string

$j_PlainPassword

current plain text Password
array

$Recordset

resultset of the query
integer

$Pointer

pointer in $Recordset
string

$ExtraQuery

Extra Query String
string

$StyleClass

Stylesheet class-name for HTML design
array

$Profile

Array that holds the Userprofile-Data
array

$Group

Array that holds the Groups in which the current user is a member of

Included files Summary, Type: include_once

jpeto/jpeto_config.php Warning: documentation is missing.
jpeto/jpeto_userprofile.php Warning: documentation is missing.
jpeto/jpeto_usergroup.php Warning: documentation is missing.

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
string $UserID
string $Password
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
string $UserID
Returns string $UserID


isAvailable

public boolean isAvailable( string $UserID )

  returns if an UserID is available (=true) or not (=false)

Parameter
string $UserID
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
string $UserID
Returns boolean $success


enable

public boolean enable( string $UserID )

  enables a user account

Parameter
string $UserID
Returns boolean $success


delete

public boolean delete( string $UserID )

  deletes a user account

Parameter
string $UserID
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
string $UserID
Returns array $Groups


isMemberOf

private boolean isMemberOf( string $GroupID )

  Returns true if current user is member of given Group

Parameter
string $GroupID
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


Included Files, Type: include_once

jpeto/jpeto_config.php

include_once( jpeto/jpeto_config.php )



jpeto/jpeto_userprofile.php

include_once( jpeto/jpeto_userprofile.php )



jpeto/jpeto_usergroup.php

include_once( jpeto/jpeto_usergroup.php )




Packageindex Classtrees Modulegroups Elementlist Report XML Files
PHPDoc 1.0beta