User_AvatarEditAction Class Reference

List of all members.

Public Member Functions

 prepare (&$controller, &$xoopsUser, $moduleConfig)
 _setupActionForm ()
 isSecure ()
 hasPermission (&$controller, &$xoopsUser, $moduleConfig)
 getDefaultView (&$controller, &$xoopsUser)
 _doExecute ()

Public Attributes

 $mSystemAvatars = array()

Detailed Description

This action handles the uploaded avatar image file.

Users who are allowed to upload, can upload custom avatars and select system avatars. So this action has to implement both of uploading and selecting. In the case of GET request, this action shows two forms to changing a avatar for specified user. One of form shows upload-form. Anther form shows the list of system avatars and the page navigator of the list.

See also:
User_AvatarEditForm

User_AvatarSelectForm


Member Function Documentation

User_AvatarEditAction::prepare ( &$  controller,
&$  xoopsUser,
moduleConfig 
)

Fetch conditions from $moduleConfig and set these to member properties. And, by the member property mConfig of the base class, any member functions of this class can access $moduleConfig.

Todo:
The limit may be not completed, yet.

User_AvatarEditAction::_setupActionForm (  ) 

This class uses AvatarUploadForm class. It requests three condition which are width limit, height limit and filesize limit.

Todo:
We may have to hand three parameters to constructor.

User_AvatarEditAction::isSecure (  ) 

Return true. This action should not be used by a guest user.

User_AvatarEditAction::hasPermission ( &$  controller,
&$  xoopsUser,
moduleConfig 
)

Check whether a current user can access this action. 1) A specified user has to exist. 2) A current user has to equal the specified user, or a current user has to be a administrator.

User_AvatarEditAction::getDefaultView ( &$  controller,
&$  xoopsUser 
)

This override method looks like the same method of ListAction, and tries to get system avatars. After, it will call base class.

User_AvatarEditAction::_doExecute (  ) 

1) Save avatar file which has been uploaded. 2) If old avatar file exists, remove it. 3) Insert a data to DB with calling base class method.


Member Data Documentation

User_AvatarEditAction::$mSystemAvatars = array()

Preset avatar object collection.


The documentation for this class was generated from the following files:
Generated on Thu Nov 2 00:27:18 2006 for XOOPS Cube Legacy by  doxygen 1.5.1