MEMBER Class Reference

List of all members.

Public Member Functions

 MEMBER ()
createFromName ($displayname)
createFromID ($id)
 readFromName ($displayname)
 readFromID ($id)
 login ($login, $password)
 cookielogin ($login, $cookiekey)
 logout ()
 isLoggedIn ()
 read ($where)
 isBlogAdmin ($blogid)
 blogAdminRights ($blogid)
 teamRights ($blogid)
 isTeamMember ($blogid)
 canAlterComment ($commentid)
 canAlterItem ($itemid)
 canUpdateItem ($itemid, $newcat)
 canAddItem ($catid)
 canBeDeleted ()
 setCookies ($shared=0)
 sendActivationLink ($type, $extra='')
 getAdminBlogs ()
 getNotifyFromMailAddress ($suggest="")
 write ()
 checkPassword ($pw)
 checkCookieKey ($key)
 getRealName ()
 setRealName ($name)
 getEmail ()
 setEmail ($email)
 getPassword ()
 setPassword ($pwd)
 getCookieKey ()
 newCookieKey ()
 setCookieKey ($val)
 getURL ()
 setURL ($site)
 getLanguage ()
 setLanguage ($lang)
 setDisplayName ($nick)
 getDisplayName ()
 isAdmin ()
 setAdmin ($val)
 canLogin ()
 setCanLogin ($val)
 getNotes ()
 setNotes ($val)
 getID ()
 exists ($name)
 existsID ($id)
 isNameProtected ($name)
 create ($name, $realname, $password, $email, $url, $admin, $canlogin, $notes)
 getActivationInfo ($key)
 generateActivationEntry ($type, $extra= '')
 activate ($key)
 cleanupActivationTable ()

Public Attributes

 $loggedin = 0
 $password
 $cookiekey
 $id = -1
 $realname
 $displayname
 $email
 $url
 $language = ''
 $admin = 0
 $canlogin = 0
 $notes


Detailed Description

A class representing site members

http://nucleuscms.org/license.txt GNU General Public License Copyright (C) 2002-2007 The Nucleus Group

Version:
Id
MEMBER.php 1116 2007-02-03 08:24:29Z kimitake
NucleusJP
MEMBER.php,v 1.7 2007/02/04 06:28:46 kimitake Exp

Definition at line 21 of file MEMBER.php.


Member Function Documentation

MEMBER::MEMBER (  ) 

Definition at line 41 of file MEMBER.php.

Referenced by createFromID(), and createFromName().

& MEMBER::createFromName ( displayname  ) 

Definition at line 46 of file MEMBER.php.

References $displayname, and MEMBER().

Referenced by ACTION::forgotPassword().

& MEMBER::createFromID ( id  ) 

MEMBER::readFromName ( displayname  ) 

Definition at line 59 of file MEMBER.php.

References $displayname, and read().

Referenced by cookielogin(), and login().

MEMBER::readFromID ( id  ) 

Definition at line 63 of file MEMBER.php.

References $id, and read().

MEMBER::login ( login,
password 
)

Tries to login as a given user. Returns true when succeeded, returns false when failed

Definition at line 71 of file MEMBER.php.

References $password, checkPassword(), isLoggedIn(), and readFromName().

MEMBER::cookielogin ( login,
cookiekey 
)

Definition at line 82 of file MEMBER.php.

References $cookiekey, checkCookieKey(), isLoggedIn(), and readFromName().

MEMBER::logout (  ) 

Definition at line 92 of file MEMBER.php.

MEMBER::isLoggedIn (  ) 

Definition at line 96 of file MEMBER.php.

Referenced by cookielogin(), getNotifyFromMailAddress(), and login().

MEMBER::read ( where  ) 

MEMBER::isBlogAdmin ( blogid  ) 

Returns true if member is an admin for the given blog (returns false if not a team member)

Definition at line 127 of file MEMBER.php.

References $blogid, $query, getID(), mysql_num_rows(), mysql_result(), and sql_query().

Referenced by blogAdminRights(), canAlterComment(), and canAlterItem().

MEMBER::blogAdminRights ( blogid  ) 

Definition at line 138 of file MEMBER.php.

References $blogid, isAdmin(), and isBlogAdmin().

Referenced by canAddItem(), and canUpdateItem().

MEMBER::teamRights ( blogid  ) 

Definition at line 143 of file MEMBER.php.

References $blogid, isAdmin(), and isTeamMember().

Referenced by canAddItem(), and canUpdateItem().

MEMBER::isTeamMember ( blogid  ) 

Returns true if this member is a team member of the given blog

Definition at line 150 of file MEMBER.php.

References $blogid, $query, getID(), mysql_num_rows(), and sql_query().

Referenced by teamRights().

MEMBER::canAlterComment ( commentid  ) 

Returns true if this member can edit/delete a commentitem. This can be in the following cases:

  • member is a super-admin

member is the author of the comment

  • member is admin of the blog associated with the comment
  • member is author of the item associated with the comment

Definition at line 166 of file MEMBER.php.

References $query, getID(), isAdmin(), isBlogAdmin(), mysql_fetch_object(), sql_query(), and sql_table().

MEMBER::canAlterItem ( itemid  ) 

Returns true if this member can edit/delete an item. This is true in the following cases: - member is a super-admin

  • member is the author of the item

member is admin of the the associated blog

Definition at line 184 of file MEMBER.php.

References $itemid, $query, getID(), isAdmin(), isBlogAdmin(), mysql_fetch_object(), and sql_query().

Referenced by canUpdateItem().

MEMBER::canUpdateItem ( itemid,
newcat 
)

returns true if this member can move/update an item to a given category, false if not (see comments fot the tests that are executed)

Parameters:
itemid 
newcat (can also be of form 'newcat-x' with x=blogid)

Definition at line 200 of file MEMBER.php.

References $blogid, $itemid, $manager, blogAdminRights(), canAlterItem(), getBlogIDFromCatID(), getBlogIDFromItemID(), getID(), quickQuery(), sql_table(), and teamRights().

MEMBER::canAddItem ( catid  ) 

Definition at line 250 of file MEMBER.php.

References $blogid, $catid, $manager, blogAdminRights(), getBlogIDFromCatID(), and teamRights().

MEMBER::canBeDeleted (  ) 

Return true if member can be deleted. This means that there are no items posted by the member left

Definition at line 278 of file MEMBER.php.

References getID(), mysql_num_rows(), sql_query(), and sql_table().

MEMBER::setCookies ( shared = 0  ) 

Sets the cookies for the member

Parameters:
shared set this to 1 when using a shared computer. Cookies will expire at the end of the session in this case.

Definition at line 290 of file MEMBER.php.

References $CONF, $shared, getCookieKey(), and getDisplayName().

MEMBER::sendActivationLink ( type,
extra = '' 
)

MEMBER::getAdminBlogs (  ) 

Returns an array of all blogids for which member has admin rights

Definition at line 358 of file MEMBER.php.

References $query, getID(), isAdmin(), mysql_fetch_object(), mysql_num_rows(), and sql_query().

MEMBER::getNotifyFromMailAddress ( suggest = ""  ) 

Returns an email address from which notification of commenting/karma voting can be sent. A suggestion can be given for when the member is not logged in

Definition at line 380 of file MEMBER.php.

References $CONF, getDisplayName(), getEmail(), isLoggedIn(), and isValidMailAddress().

MEMBER::write (  ) 

MEMBER::checkPassword ( pw  ) 

Definition at line 411 of file MEMBER.php.

References $pw, and getPassword().

Referenced by login().

MEMBER::checkCookieKey ( key  ) 

Definition at line 415 of file MEMBER.php.

References getCookieKey().

Referenced by cookielogin().

MEMBER::getRealName (  ) 

Definition at line 419 of file MEMBER.php.

Referenced by write().

MEMBER::setRealName ( name  ) 

Definition at line 423 of file MEMBER.php.

Referenced by read().

MEMBER::getEmail (  ) 

Definition at line 427 of file MEMBER.php.

Referenced by getNotifyFromMailAddress(), sendActivationLink(), and write().

MEMBER::setEmail ( email  ) 

Definition at line 431 of file MEMBER.php.

References $email.

Referenced by read().

MEMBER::getPassword (  ) 

Definition at line 435 of file MEMBER.php.

Referenced by checkPassword(), and write().

MEMBER::setPassword ( pwd  ) 

Definition at line 439 of file MEMBER.php.

MEMBER::getCookieKey (  ) 

Definition at line 443 of file MEMBER.php.

Referenced by checkCookieKey(), setCookies(), and write().

MEMBER::newCookieKey (  ) 

Generate new cookiekey, save it, and return it

Definition at line 450 of file MEMBER.php.

References write().

MEMBER::setCookieKey ( val  ) 

Definition at line 457 of file MEMBER.php.

Referenced by read().

MEMBER::getURL (  ) 

Definition at line 461 of file MEMBER.php.

Referenced by write().

MEMBER::setURL ( site  ) 

Definition at line 465 of file MEMBER.php.

Referenced by read().

MEMBER::getLanguage (  ) 

Definition at line 469 of file MEMBER.php.

Referenced by write().

MEMBER::setLanguage ( lang  ) 

Definition at line 473 of file MEMBER.php.

Referenced by read().

MEMBER::setDisplayName ( nick  ) 

Definition at line 477 of file MEMBER.php.

Referenced by read().

MEMBER::getDisplayName (  ) 

Definition at line 481 of file MEMBER.php.

Referenced by getNotifyFromMailAddress(), sendActivationLink(), setCookies(), and write().

MEMBER::isAdmin (  ) 

MEMBER::setAdmin ( val  ) 

Definition at line 489 of file MEMBER.php.

Referenced by read().

MEMBER::canLogin (  ) 

Definition at line 493 of file MEMBER.php.

Referenced by generateActivationEntry(), and write().

MEMBER::setCanLogin ( val  ) 

Definition at line 497 of file MEMBER.php.

Referenced by read().

MEMBER::getNotes (  ) 

Definition at line 501 of file MEMBER.php.

Referenced by write().

MEMBER::setNotes ( val  ) 

Definition at line 505 of file MEMBER.php.

Referenced by read().

MEMBER::getID (  ) 

MEMBER::exists ( name  ) 

MEMBER::existsID ( id  ) 

Definition at line 520 of file MEMBER.php.

References $id, mysql_num_rows(), sql_query(), and sql_table().

Referenced by selector().

MEMBER::isNameProtected ( name  ) 

Definition at line 526 of file MEMBER.php.

References exists().

Referenced by COMMENTS::addComment().

MEMBER::create ( name,
realname,
password,
email,
url,
admin,
canlogin,
notes 
)

MEMBER::getActivationInfo ( key  ) 

Returns activation info for a certain key (an object with properties vkey, vmember, ...) (static)

Author:
karma

Definition at line 580 of file MEMBER.php.

References $query, mysql_fetch_object(), mysql_num_rows(), sql_query(), and sql_table().

Referenced by ADMIN::_showActivationPage(), and ADMIN::action_activatesetpwd().

MEMBER::generateActivationEntry ( type,
extra = '' 
)

Creates an account activation key

Parameters:
$type one of the following values (determines what to do when activation expires) 'register' (new member registration) 'forgot' (forgotton password) 'addresschange' (member address has changed)
$extra extra info (needed when validation link expires) addresschange -> old email address
Author:
dekarma

Definition at line 602 of file MEMBER.php.

References $query, canLogin(), cleanupActivationTable(), getID(), sql_query(), and sql_table().

Referenced by sendActivationLink().

MEMBER::activate ( key  ) 

Inidicates that an activation link has been clicked and any forms displayed there have been successfully filled out.

Author:
dekarma

Definition at line 655 of file MEMBER.php.

Referenced by ADMIN::_showActivationPage(), and ADMIN::action_activatesetpwd().

MEMBER::cleanupActivationTable (  ) 

Cleans up entries in the activation table. All entries older than 2 days are removed. (static)

Author:
dekarma

Definition at line 694 of file MEMBER.php.

References $DIR_LIBS, ADMIN::deleteOneMember(), mysql_fetch_object(), sql_query(), and sql_table().

Referenced by ADMIN::_showActivationPage(), ADMIN::action_activatesetpwd(), and generateActivationEntry().


Member Data Documentation

MEMBER::$loggedin = 0

Definition at line 24 of file MEMBER.php.

MEMBER::$password

Definition at line 25 of file MEMBER.php.

Referenced by create(), and login().

MEMBER::$cookiekey

Definition at line 27 of file MEMBER.php.

Referenced by cookielogin().

MEMBER::$id = -1

Definition at line 30 of file MEMBER.php.

Referenced by createFromID(), existsID(), and readFromID().

MEMBER::$realname

Definition at line 31 of file MEMBER.php.

Referenced by create().

MEMBER::$displayname

Definition at line 32 of file MEMBER.php.

Referenced by createFromName(), and readFromName().

MEMBER::$email

Definition at line 33 of file MEMBER.php.

Referenced by create(), and setEmail().

MEMBER::$url

Definition at line 34 of file MEMBER.php.

Referenced by create(), and sendActivationLink().

MEMBER::$language = ''

Definition at line 35 of file MEMBER.php.

MEMBER::$admin = 0

Definition at line 36 of file MEMBER.php.

Referenced by create().

MEMBER::$canlogin = 0

Definition at line 37 of file MEMBER.php.

Referenced by create().

MEMBER::$notes

Definition at line 38 of file MEMBER.php.

Referenced by create().


The documentation for this class was generated from the following file:



Generated on Wed Jun 25 17:26:02 2008 by  doxygen 1.5.5