# \Thelia\ActionCustomer

## Summary

Methods
Properties
Constants
__construct()
create()
modify()
logout()
login()
changePassword()
getSubscribedEvents()
No public properties found
No constants found
processSuccessfullLogin()
getSecurityContext()
validateForm()
propagateFormError()
redirect()
$securityContext
N/A
No private methods found
No private properties found
N/A

File
  Action/Customer.php
Package
  \Default
Class hierarchy
  \Thelia\Action\BaseAction
  \Thelia\Action\Customer

## Tags

None found

## Properties

### $securityContext

    $securityContext : \Thelia\Action\Thelia\Core\Security\SecurityContext

#### Type

\Thelia\Action\Thelia\Core\Security\SecurityContext

#

## Tags

None found

## Methods

### __construct()

    __construct(\Thelia\Core\Security\SecurityContext $securityContext)

#### Parameters

\Thelia\Core\Security\SecurityContext | $securityContext |

#

## Tags

None found

### create()

    create(\Thelia\Core\Event\ActionEvent $event)

#### Parameters

\Thelia\Core\Event\ActionEvent | $event |

#

## Tags

None found

### modify()

    modify(\Thelia\Core\Event\ActionEvent $event)

#### Parameters

\Thelia\Core\Event\ActionEvent | $event |

#

## Tags

None found

### logout()

    logout(\Thelia\Core\Event\ActionEvent $event)

Perform user logout. The user is redirected to the provided view, if any.

#### Parameters

\Thelia\Core\Event\ActionEvent | $event |

#

## Tags

None found

### login()

    login(\Thelia\Core\Event\ActionEvent $event)

Perform user login. On a successful login, the user is redirected to the URL found in the success_url form parameter, or / if none was found.

If login is not successfull, the same view is dispolyed again.

#### Parameters

\Thelia\Core\Event\ActionEvent | $event |

#

## Tags

None found

### changePassword()

    changePassword(\Thelia\Core\Event\ActionEvent $event)

#### Parameters

\Thelia\Core\Event\ActionEvent | $event |

#

## Tags

None found

### getSubscribedEvents()

    getSubscribedEvents() : array

Returns an array of event names this subscriber wants to listen to.

The array keys are event names and the value can be:

- The method name to call (priority defaults to 0)
- An array composed of the method name to call and the priority
- An array of arrays composed of the method names to call and respective priorities, or 0 if unset

For instance:

- array('eventName' => 'methodName')
- array('eventName' => array('methodName', $priority))
- array('eventName' => array(array('methodName1', $priority), array('methodName2'))

#### Returns

array —

The event names to listen to

#

static

## Tags

api |

### processSuccessfullLogin()

    processSuccessfullLogin(\Thelia\Core\Event\ActionEvent $event, \Thelia\Model\Customer $user, \Thelia\Form\BaseForm $form,  $sendLoginEvent)

Stores the current user in the security context, and redirect to the success_url.

#### Parameters

\Thelia\Core\Event\ActionEvent | $event |
\Thelia\Model\Customer | $user | the logged user
\Thelia\Form\BaseForm | $form |
| $sendLoginEvent |

#

## Tags

None found

### getSecurityContext()

    getSecurityContext() : \Thelia\Core\Security\SecurityContext

Return the security context, beeing sure that we're in the CONTEXT_FRONT_OFFICE context

#### Returns

\Thelia\Core\Security\SecurityContext —

the security context

#

## Tags

None found

### validateForm()

    validateForm(\Thelia\Form\BaseForm $aBaseForm,  $expectedMethod)

#### Parameters

\Thelia\Form\BaseForm | $aBaseForm |
| $expectedMethod |

#

Inherited from
  \Thelia\Action\BaseAction

## Tags

None found

### propagateFormError()

    propagateFormError(\Thelia\Form\BaseForm $aBaseForm, string $error_message, \Thelia\Core\Event\ActionEvent $event)

#### Parameters

\Thelia\Form\BaseForm | $aBaseForm |
string | $error_message |
\Thelia\Core\Event\ActionEvent | $event |

#

Inherited from
  \Thelia\Action\BaseAction

## Tags

None found

### redirect()

    redirect( $url,  $status)

#### Parameters

| $url |
| $status |

#

Inherited from
  \Thelia\Action\BaseAction

## Tags

None found

### Customer.php