ここの情報は古いです。ご理解頂いた上でお取り扱いください。

Changeset 10348


Ignore:
Timestamp:
Jan 23, 2009, 11:57:42 PM (11 years ago)
Author:
ebihara
Message:

#3287:added ability to delete the member's account himself

Location:
OpenPNE3/trunk
Files:
5 added
4 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE3/trunk/apps/mobile_frontend/i18n/messages.ja.xml

    r10309 r10348  
    207207        <target>以下のURLから%1%に登録してください。</target>
    208208      </trans-unit>
     209      <trans-unit id="">
     210        <source>Delete your %1% account</source>
     211        <target>%1%を退会する</target>
     212      </trans-unit>
     213      <trans-unit id="">
     214        <source>You can not delete your account.</source>
     215        <target>IDが1のメンバーは退会することができません。</target>
     216      </trans-unit>
     217      <trans-unit id="">
     218        <source>Do you delete your %1% account?</source>
     219        <target>本当に%1%から退会しますか?</target>
     220      </trans-unit>
     221      <trans-unit id="">
     222        <source>Please input your password if you want to delete your account.</source>
     223        <target>退会する場合はパスワードを入力してください。</target>
     224      </trans-unit>
    209225    </body>
    210226  </file>
  • OpenPNE3/trunk/apps/mobile_frontend/modules/member/templates/homeSuccess.php

    r10309 r10348  
    7474}
    7575$list[] = link_to(__('Setting easy login'), 'member/configUID');
    76 op_include_list('configEdit', $list, array('title' => __('Settings')))
     76$list[] = link_to(__('Delete your %1% account', array('%1%' => $op_config['sns_name'])), 'member/delete');
     77op_include_list('configEdit', $list, array('title' => __('Settings')));
    7778?>
    7879
  • OpenPNE3/trunk/apps/pc_frontend/modules/member/templates/configSuccess.php

    r10292 r10348  
    1111op_include_parts('pageNav', 'pageNav', array('list' => $list, 'current' => $categoryName));
    1212?>
     13
     14<?php
     15op_include_box('navForDelete', link_to(__('%1%を退会する', array('%1%' => $op_config['sns_name'])), 'member/delete'));
     16?>
    1317<?php end_slot(); ?>
    1418
  • OpenPNE3/trunk/lib/action/sfOpenPNEMemberAction.class.php

    r10119 r10348  
    270270    return sfView::INPUT;
    271271  }
     272
     273 /**
     274  * Executes delete action
     275  *
     276  * @param sfRequest $request A request object
     277  */
     278  public function executeDelete($request)
     279  {
     280    if (1 == $this->getUser()->getMemberId())
     281    {
     282      return sfView::ERROR;
     283    }
     284
     285    $this->form = new sfOpenPNEPasswordForm(array(), array('member' => $this->getUser()->getMember()));
     286    if ($request->isMethod('post'))
     287    {
     288      $this->form->bind($request->getParameter('password'));
     289      if ($this->form->isValid())
     290      {
     291        $this->getUser()->getMember()->delete();
     292        $this->getUser()->setFlash('notice', '退会が完了しました');
     293        $this->getUser()->logout();
     294        $this->redirect('member/login');
     295      }
     296    }
     297
     298    return sfView::INPUT;
     299  }
    272300}
Note: See TracChangeset for help on using the changeset viewer.