Changeset 1388


Ignore:
Timestamp:
Jan 14, 2013, 2:29:19 PM (5 years ago)
Author:
dkg
Message:

avoid creating new accounts when signup is closed, but allow new account signups already in play to complete

Location:
trunk/jpdd
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/jpdd/class.dkg.site.php

    r1370 r1388  
    975975        if (is_null($this->_identifier)) {
    976976          // this is just requesting a new account:
    977           if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    978             return $this->handleNewAccountRequest($_POST['reset_email']);
     977          if ($this->isSignupClosed()) {
     978            $this->addWarning('New signups are currently closed.  Please try creating a new account once they have opened.');
     979            return $this->getDefaultPage();
    979980          } else {
    980             return $this->getNewAccountRequestForm();
     981            if ($_SERVER['REQUEST_METHOD'] == 'POST') {
     982              return $this->handleNewAccountRequest($_POST['reset_email']);
     983            } else {
     984              return $this->getNewAccountRequestForm();
     985            }
    981986          }
    982987        } else {
  • trunk/jpdd/class.jpdd.php

    r1363 r1388  
    165165    function getAllowedActions() {
    166166      $ret = array_merge(parent::getAllowedActions(), array('signup', 'printout', 'overview', 'open', 'liaison', 'managesignups'));
    167       if ($this->isSignupClosed()) // don't allow new accounts if signup is closed.
    168         $ret = array_diff($ret, array('newacct'));
    169167      return $ret;
    170168    }
Note: See TracChangeset for help on using the changeset viewer.