Changeset 466
- Timestamp:
- 02/01/08 20:56:25 (11 months ago)
- Location:
- trunk
- Files:
-
- 1 added
- 12 modified
-
modules/base/classes/mailer.php (modified) (1 diff)
-
modules/base/classes/userManager.php (added)
-
modules/base/classes/validator.php (modified) (1 diff)
-
modules/base/installAdminUser.php (modified) (1 diff)
-
modules/base/installBase.php (modified) (1 diff)
-
modules/base/installCheckEnv.php (modified) (1 diff)
-
modules/base/installDefaultSiteProfile.php (modified) (1 diff)
-
modules/base/installFinish.php (modified) (2 diffs)
-
modules/base/templates/install.tpl (modified) (1 diff)
-
modules/base/templates/install_check_env.tpl (modified) (2 diffs)
-
modules/base/templates/install_finish.tpl (modified) (1 diff)
-
modules/base/usersNewAccount.php (modified) (1 diff)
-
public/install.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/modules/base/classes/mailer.php
r241 r466 57 57 $this->config = $c->fetch('base'); 58 58 59 $this->e = &owa_ error::get_instance();59 $this->e = &owa_coreApi::errorSingleton(); 60 60 61 61 if (!empty($this->config['mailer-from'])): -
trunk/modules/base/classes/validator.php
r241 r466 152 152 153 153 ?> 154 -
trunk/modules/base/installAdminUser.php
r364 r466 133 133 // Set user object Params 134 134 if (empty($id)): 135 136 //Generate Initial Passkey and new account email137 $auth->setInitialPasskey($this->params['user_id']);138 139 // log account creation event to event queue140 $eq = &eventQueue::get_instance();141 $eq->log(array( 'user_id' => $this->params['user_id'],142 'real_name' => $this->params['real_name'],143 'role' => $this->params['role'],144 'email_address' => $this->params['email_address']),145 'base.new_user_account');146 135 147 // return view 148 $data['view_method'] = 'redirect'; 149 $data['view'] = 'base.install'; 150 $data['subview'] = 'base.installDefaultSiteProfile'; 151 $data['status_code'] = 3304; 136 $userManager = owa_coreApi::supportClassFactory('base', 'userManager'); 137 138 139 $user_params = array( 'user_id' => $this->params['user_id'], 140 'real_name' => $this->params['real_name'], 141 'role' => $this->params['role'], 142 'email_address' => $this->params['email_address']); 143 144 $temp_passkey = $userManager->createNewUser($user_params); 145 146 // return view 147 $data['view_method'] = 'redirect'; 148 149 $data['u'] = $this->params['user_id']; 150 $data['k'] = $temp_passkey; 151 $data['action'] = 'base.installFinish'; 152 $data['status_code'] = 3304; 152 153 153 154 else: -
trunk/modules/base/installBase.php
r249 r466 50 50 $data['view_method'] = 'redirect'; 51 51 $data['view'] = 'base.install'; 52 $data['subview'] = 'base.install AdminUser';52 $data['subview'] = 'base.installDefaultSiteProfile'; 53 53 $data['status_code'] = 3305; 54 54 else: -
trunk/modules/base/installCheckEnv.php
r241 r466 97 97 // Check DB connection status 98 98 $db = &owa_coreAPI::dbSingleton(); 99 $db->connect(); 99 100 if ($db->connection_status != true): 100 101 $errors['count'] = $errors['count']++; -
trunk/modules/base/installDefaultSiteProfile.php
r364 r466 123 123 124 124 $data['view_method'] = 'redirect'; // Delegate, redirect 125 $data['action'] = 'base.installFinish'; 125 $data['view'] = 'base.install'; 126 $data['subview'] = 'base.installAdminUser'; 126 127 $data['status_code'] = 3303; 127 128 $data['site_id'] = $site->get('site_id'); -
trunk/modules/base/installFinish.php
r364 r466 61 61 endif; 62 62 63 64 $site = owa_coreAPI::entityFactory('base.site'); 65 66 $site->getByPk('id', '1'); 67 63 68 $data = array(); 64 69 $data['view'] = 'base.install'; 65 70 $data['subview'] = 'base.installFinish'; 66 71 $data['view_method'] = 'delegate'; 67 $data['site_id'] = $ this->params['site_id'];72 $data['site_id'] = $site->get('site_id'); 68 73 $data['status_code'] = $this->params['status_code']; 74 $data['u'] = $this->params['u']; 75 $data['k'] = $this->params['k']; 69 76 70 77 return $data; … … 97 104 98 105 $this->body->set('site_id', $data['site_id']); 106 $this->body->set('u', $data['u']); 107 $this->body->set('key', $data['k']); 99 108 // load body template 100 109 $this->body->set_template('install_finish.tpl'); -
trunk/modules/base/templates/install.tpl
r293 r466 8 8 <TD colspan="2"> 9 9 <P> 10 Install ationSteps: 10 Install Steps: 11 11 <span class="<? if ($step == 'base.installStart'):?>active_wizard_step<?else:?>wizard_step<?endif;?>">Welcome</span> >> 12 12 <span class="<? if ($step == 'base.installCheckEnv'):?>active_wizard_step<?else:?>wizard_step<?endif;?>">Server Environment Check</span> >> 13 <span class="<? if ($step == 'base.install AdminUser'):?>active_wizard_step<?else:?>wizard_step<?endif;?>">Admin User Setup</span> >> 14 <span class="<? if ($step == 'base.install DefaultSiteProfile'):?>active_wizard_step<?else:?>wizard_step<?endif;?>">Site Profile Setup</span> >> 15 <span class="<? if ($step == 'base.installFinish'):?>active_wizard_step<?else:?>wizard_step<?endif;?>"> Install Complete</span>13 <span class="<? if ($step == 'base.installDefaultSiteProfile'):?>active_wizard_step<?else:?>wizard_step<?endif;?>">Default Site Profile</span> >> 14 <span class="<? if ($step == 'base.installAdminUser'):?>active_wizard_step<?else:?>wizard_step<?endif;?>">Admin User</span> >> 15 <span class="<? if ($step == 'base.installFinish'):?>active_wizard_step<?else:?>wizard_step<?endif;?>">Finish</span> 16 16 </P> 17 17 </TD> -
trunk/modules/base/templates/install_check_env.tpl
r249 r466 30 30 </TR> 31 31 <TR> 32 <TH scope="row"> Log DirectoryPermissions</TH>32 <TH scope="row">File System Permissions</TH> 33 33 <TD class="<? if ($errors['log_dir_permission']):?>red 34 34 <?elseif ($warnings['log_dir_permission']):?>yellow … … 43 43 <? if ($errors['count'] == 0):?> 44 44 <DIV class="centered_buttons"> 45 <a href="<?=$this->makeLink(array('action' => 'base.installBase'));?>">Next >> Next Step: Admin UserSetup</a>45 <a href="<?=$this->makeLink(array('action' => 'base.installBase'));?>">Next >> Next Step: Default Site Setup</a> 46 46 </DIV> 47 47 <? else:?> -
trunk/modules/base/templates/install_finish.tpl
r238 r466 3 3 <div class="subview_content"> 4 4 5 <h1>Installation Complete (you made it).</h1>5 <h1>Installation Complete. (wasn't that easy?)</h1> 6 6 7 <h1>But...</h1> 8 9 <h2>Before you can start tracking anything you must...</h2> 7 <h2>Before you can start using OWA you must...</h2> 10 8 11 9 <h3>1. Set Your Admin User Password</h3> 12 10 13 An e-mail containing instructions on how to do this has been sent to the address that you registered with. 11 You must set the admin password of your account. 12 13 <table> 14 <TR> 15 <TH>User Name:</TH> 16 <TD><?=$u;?></TD> 17 </TR> 18 <TR> 19 <TH>Password:</TH> 20 <TD><a href="<?=$this->makeAbsoluteLink(array('view' => 'base.usersChangePassword', 'k' => $key));?>"> Click here to set password</a></TD> 21 </TR> 22 </table> 14 23 15 24 <h3>2. Place Javascript Tracking Tags or Use the PHP API</h3> -
trunk/modules/base/usersNewAccount.php
r238 r466 42 42 function action() { 43 43 44 // save new user to db 45 $auth = &owa_auth::get_instance(); 46 $u = owa_coreAPI::entityFactory('base.user'); 47 $u->set('user_id', $this->params['user_id']); 48 $u->set('role', $this->params['role']); 49 $u->set('real_name', $this->params['real_name']); 50 $u->set('email_address', $this->params['email_address']); 51 $u->set('temp_passkey', $auth->generateTempPasskey($this->params['user_id'])); 52 $u->set('creation_date', time()); 53 $u->set('last_update_date', time()); 54 $u->create(); 55 44 if ($this->params['just_email') == false): 45 // save new user to db 46 $auth = &owa_auth::get_instance(); 47 $u = owa_coreAPI::entityFactory('base.user'); 48 $u->set('user_id', $this->params['user_id']); 49 $u->set('role', $this->params['role']); 50 $u->set('real_name', $this->params['real_name']); 51 $u->set('email_address', $this->params['email_address']); 52 $u->set('temp_passkey', $auth->generateTempPasskey($this->params['user_id'])); 53 $u->set('creation_date', time()); 54 $u->set('last_update_date', time()); 55 $u->create(); 56 endif; 56 57 // return email view 57 58 $data['user_id']= $this->params['user_id']; -
trunk/public/install.php
r293 r466 36 36 $config['do_not_fetch_config_from_db'] = true; 37 37 $config['main_url'] = 'install.php'; 38 $config['cache_objects'] = false; 38 39 $owa = new owa_php($config); 39 40
