# \Thelia\ActionCustomer

## Summary

Methods
Properties
Constants
__construct()
create()
modify()
logout()
login()
changePassword()
getSubscribedEvents()
redirect()
No public properties found
No constants found
processSuccessfulLogin()
getSecurityContext()
$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 |

### redirect()

    redirect( $url,  $status)

#### Parameters

| $url |
| $status |

#

Inherited from
  \Thelia\Action\BaseAction

## Tags

None found

### processSuccessfulLogin()

    processSuccessfulLogin(\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

### Customer.php