auth Class Reference

authentification related functions More...

List of all members.

Public Member Functions

 getUserInfoFromCookieOrSession ()
 return user info from cookie or session
 checkRights ($wiki)
 return a user from session variables (user is logged) or anonymous user
 isIPInNet ($ip, $network, $mask)
 check if an ip is in a network/mask
 isIpInNetArray ($ip, $network_array)
 check if an ip is in a list of network/mask
 collectIpsFromString (&$ips, $str)
 parse a comma separated list of ips and add it to ips
 filterOutPrivateIps ($ips)
 return a list of filtered IP (private ips are taken out)
 getIPs ($filter_out_private_ips=false)
 return list of IP from currently connected browser
 generateRandomText ($textLen)
 randomly generates a text
 aclMatch ($default_global_action, $acl_type, $user, $node)
 is it possible for this user to do an action on this node based on acls and an acl_type
 canEdit ($user, $node)
 is it possible for this user to edit this node
 canRead ($user, $node)
 is it possible for this user to read this node
 canComment ($user, $node)
 is it possible for this user to comment
 banned ()
 look into the table of banned ip and returns true if ip of current user was banned


Detailed Description

authentification related functions


Member Function Documentation

auth::aclMatch ( default_global_action,
acl_type,
user,
node 
)

is it possible for this user to do an action on this node based on acls and an acl_type

Parameters:
default_global_action the default parameter for the whole wiki
acl_type the acl_type to check
user the user to check
node the node to check ACL
Returns:
true if the user can edit the node, false otherwise

auth::banned (  ) 

look into the table of banned ip and returns true if ip of current user was banned

auth::canComment ( user,
node 
)

is it possible for this user to comment

Parameters:
user the user to check
node the node to check ACL
Returns:
true if the user can comment, false otherwise

auth::canEdit ( user,
node 
)

is it possible for this user to edit this node

Parameters:
user the user to check
node the node to check ACL
Returns:
true if the user can edit the node, false otherwise

auth::canRead ( user,
node 
)

is it possible for this user to read this node

Parameters:
user the user to check
node the node to check ACL
Returns:
true if the user can edit the node, false otherwise

auth::checkRights ( wiki  ) 

return a user from session variables (user is logged) or anonymous user

Parameters:
wiki the wiki controller object
Returns:
user

auth::collectIpsFromString ( &$  ips,
str 
)

parse a comma separated list of ips and add it to ips

Parameters:
ips the array of ip to complete
str the string to parse

auth::filterOutPrivateIps ( ips  ) 

return a list of filtered IP (private ips are taken out)

Parameters:
ips ips to filter
Returns:
filtered ips

auth::generateRandomText ( textLen  ) 

randomly generates a text

Parameters:
$textLen length of text
Returns:
random text

auth::getIPs ( filter_out_private_ips = false  ) 

return list of IP from currently connected browser

Parameters:
$filter_out_private_ips indicates if we need to filter out private ips
Returns:
IP array

auth::getUserInfoFromCookieOrSession (  ) 

return user info from cookie or session

Returns:
array(user_id, MD5 encoded user_password)

auth::isIPInNet ( ip,
network,
mask 
)

check if an ip is in a network/mask

Parameters:
ip the ip to check
network the network to compare against
mask the mask to apply on network for comparison
Returns:
true if match

auth::isIpInNetArray ( ip,
network_array 
)

check if an ip is in a list of network/mask

Parameters:
ip the ip to check
network_array a list of network/mask
Returns:
true if found


The documentation for this class was generated from the following file:
Generated on Mon Feb 19 19:11:58 2007 for Wiclear by  doxygen 1.4.7