Exemplo n.º 1
0
             $count++;
         }
     }
     break;
 case 'reset':
     foreach ($users as $U) {
         if (($acct = $U->getAccount()) && $acct->sendResetEmail()) {
             $count++;
         }
     }
     break;
 case 'register':
     foreach ($users as $U) {
         if (($acct = $U->getAccount()) && $acct->sendConfirmEmail()) {
             $count++;
         } elseif ($acct = UserAccount::register($U, array('sendemail' => true), $errors)) {
             $count++;
         }
     }
     break;
 case 'setorg':
     if (!($org = Organization::lookup($_POST['org_id']))) {
         $errors['err'] = __('Unknown action - get technical help.');
     }
     foreach ($users as $U) {
         if ($U->setOrganization($org)) {
             $count++;
         }
     }
     break;
 default:
Exemplo n.º 2
0
 function register($vars, &$errors)
 {
     // user already registered?
     if ($this->getAccount()) {
         return true;
     }
     return UserAccount::register($this, $vars, $errors);
 }