.

RegisterUsersBaseCommand Class Reference
[Usermanagement]

Register command to be overloaded. More...

Inheritance diagram for RegisterUsersBaseCommand:
CommandChain CommandBase ICommand IAction ISerializable RegisterUsersCommand

List of all members.

Public Member Functions

  get_name ()
  Returns title of command.

Protected Member Functions

  do_execute ()
  Execute this command.

Detailed Description

Register command to be overloaded.

Author:
Gerd Riesselmann

Definition at line 8 of file register.cmd.php.


Member Function Documentation

RegisterUsersBaseCommand::do_execute (  )  [protected]

Execute this command.

Reimplemented from CommandChain.

Definition at line 19 of file register.cmd.php.

00019                                         {
00020                 $ret = new Status();
00021                 
00022                 $create_cmd = CommandsFactory::create_command('users', 'create', $this->get_params());
00023                 $ret->merge($create_cmd->execute());
00024                 if ($ret->is_ok()) {
00025                         $user = $create_cmd->get_result();
00026                         $this->set_result($user);
00027                         // Create Double OptIn
00028                         $params_double_opt_in = array(
00029                                 'id_item' => $user->id,
00030                                 'expirationdate' => time() + 7 * 24 * 60 * 60, // today + 7 days
00031                                 'action' => 'createaccount'
00032                         );                      
00033                         $this->append(CommandsFactory::create_command('confirmations', 'create', $params_double_opt_in));
00034                 }
00035                 return $ret;
00036         }       
RegisterUsersBaseCommand::get_name (  ) 

Returns title of command.

Reimplemented from CommandBase.

Definition at line 12 of file register.cmd.php.

00012                                    {
00013                 return 'register';
00014         }

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