public function resetPassword(array $user)
    {
        $store = $this->store->get($user['store_id']);
        $options = $this->store->getConfig(null, $store);
        $store_name = $this->store->getTranslation('title', $this->translation->getLangcode(), $store);
        $base = $this->store->getUrl($store);

        $date_format = $this->config->get('date_full_format', 'd.m.Y H:i');

        $vars = array(
            '@name' => $user['name'],
            '@store' => $store_name,
            '@expires' => date($date_format, $user['data']['reset_password']['expires']),
            '@link' => "$base/forgot?" . http_build_query(array('key' => $user['data']['reset_password']['token'], 'user_id' => $user['user_id'])),
        );

        $subject = $this->translation->text('Password recovery for @name on @store', $vars);
        $message = $this->translation->text("You or someone else requested a new password on @store\r\n\r\nTo get the password please click on the following link:\r\n@link\r\n\r\nThis link expires on @expires and nothing will happen if it's not used", $vars);
        $message .= $this->getSignature($options);

        $options['from'] = $this->store->getConfig('email.0', $store);
        return array($user['email'], $subject, $message, $options);
    }
public function resetPassword(array $user)
    {
        $store = $this->store->get($user['store_id']);
        $options = $this->store->getConfig(null, $store);
        $store_name = $this->store->getTranslation('title', $this->translation->getLangcode(), $store);
        $base = $this->store->getUrl($store);

        $date_format = $this->config->get('date_full_format', 'd.m.Y H:i');

        $vars = array(
            '@name' => $user['name'],
            '@store' => $store_name,
            '@expires' => date($date_format, $user['data']['reset_password']['expires']),
            '@link' => "$base/forgot?" . http_build_query(array('key' => $user['data']['reset_password']['token'], 'user_id' => $user['user_id'])),
        );

        $subject = $this->translation->text('Password recovery for @name on @store', $vars);
        $message = $this->translation->text("You or someone else requested a new password on @store\r\n\r\nTo get the password please click on the following link:\r\n@link\r\n\r\nThis link expires on @expires and nothing will happen if it's not used", $vars);
        $message .= $this->getSignature($options);

        $options['from'] = $this->store->getConfig('email.0', $store);
        return array($user['email'], $subject, $message, $options);
    }
public function resetPassword ( array $ user ) { $ store = $ this -> store -> get ( $ user [ 'store_id' ] ) ; $ options = $ this -> store -> getConfig ( null , $ store ) ; $ store_name = $ this -> store -> getTranslation ( 'title' , $ this -> translation -> getLangcode ( ) , $ store ) ; $ base = $ this -> store -> getUrl ( $ store ) ; $ date_format = $ this -> config -> get ( 'date_full_format' , 'd.m.Y H:i' ) ; $ vars = array ( '@name' => $ user [ 'name' ] , '@store' => $ store_name , '@expires' => date ( $ date_format , $ user [ 'data' ] [ 'reset_password' ] [ 'expires' ] ) , '@link' => "$base/forgot?" . http_build_query ( array ( 'key' => $ user [ 'data' ] [ 'reset_password' ] [ 'token' ] , 'user_id' => $ user [ 'user_id' ] ) ) , ) ; $ subject = $ this -> translation -> text ( 'Password recovery for @name on @store' , $ vars ) ; $ message = $ this -> translation -> text ( "You or someone else requested a new password on @store\r\n\r\nTo get the password please click on the following link:\r\n@link\r\n\r\nThis link expires on @expires and nothing will happen if it's not used" , $ vars ) ; $ message .= $ this -> getSignature ( $ options ) ; $ options [ 'from' ] = $ this -> store -> getConfig ( 'email.0' , $ store ) ; return array ( $ user [ 'email' ] , $ subject , $ message , $ options ) ; }
Sent when a user wants to reset his password
@param array $user
@return array
Sent when a user wants to reset his password