Exemplo n.º 1
0
 /**
  * Confirmation procedure
  *
  * @param	string	$ack
  * @return	boolean	true on success or false on fail
  */
 function confirm($ack)
 {
     if (!vivvo_hooks_manager::call('login_confirm', array(&$ack))) {
         return vivvo_hooks_manager::get_status();
     }
     $user_list = new Users_list();
     $user = $user_list->get_user_by_md5($ack);
     if ($user === false) {
         $this->set_error_code(2710);
         return false;
     } else {
         $user->set_activated('1');
         vivvo_lite_site::get_instance()->get_template()->assign('CONFIRMED', 1);
         $this->_post_master->set_data_object($user);
         if ($this->_post_master->sql_update()) {
             return true;
         } else {
             $this->set_error_code(2711);
             return false;
         }
     }
 }