Resets the  account id, property id and profile id

@param int id
10041
public function resetPropertyId($id = false)
    {
        $em = $this->getEntityManager();
        $config = $id ? $this->find($id) : $this->findFirst();
        $config->setAccountId('');
        $config->setProfileId('');
        $config->setPropertyId('');
        $em->persist($config);
        $em->flush();
    }
182589
public function set_id( $id ) {
		$this->id = $this->is_valid_id( $id ) ? $id : $this->generate_session_id();
	}
698917
public function setId( $id )
	{
		if( $id === $this->getId() ) { return; }

		$this->_values['id'] = (string) $id ;
		$this->setModified();
	}
292244
public static function setCurrentID($id)
    {
        $type = self::getType();
        $appID = App::getCurrentID();
        if (array_key_exists($id, self::$instances[$appID][$type])) {
            self::$id = $id;

            return true;
        }

        return false;
    }
1322826
synchronized void removeUserProfile(String id) {

        if (id == null) return;
        final String tableName = Table.USER_PROFILES.getName();
        try {
            final SQLiteDatabase db = dbHelper.getWritableDatabase();
            db.delete(tableName, "_id = ?", new String[]{id});
        } catch (final SQLiteException e) {
            getConfigLogger().verbose("Error removing user profile from " + tableName + " Recreating DB");
            dbHelper.deleteDatabase();
        } finally {
            dbHelper.close();
        }
    }
572115
public function resetID()
    {
        if (session_status() === PHP_SESSION_ACTIVE)
        {
            $this->set('session_mgmt', 'destroyed', time());
            $auth = $this->get('authentication');
            if ($auth)
                unset($this['authentication']);

            $new_session_id = self::create_new_id();
            $this->set('session_mgmt', 'new_session_id', $new_session_id);
            session_commit();
            
            ini_set('session.use_strict_mode', 0);
            session_id($new_session_id);

            session_start();
            ini_set('session.use_strict_mode', 1);
            $this->session_id = session_id();
            $this->values = &$_SESSION;
            $this->session_cookie->setValue($new_session_id);

            // Force destroyed to be empty 
            $this->set('session_mgmt', 'destroyed', null);

            if ($auth)
                $this['authentication'] = $auth;

            // Store the start time of the new session
            $this->set('session_mgmt', 'start_time', time());
        }
    }
779906
public static function logout($id = null)
    {
        if (!$id) $id = \Zend_Auth::getInstance()->getIdentity();
        if (!$id) return;
        self::getDbConnection()->executeQuery("DELETE FROM users_auth WHERE user_id=".$id['user_id']." and uniq='".$id['uniq']."'");
        \Zend_Auth::getInstance()->clearIdentity();
		\Zend_Session::forgetMe();		
    }
532710
public void reset(int profileId, String clientUUID) throws Exception {
        PreparedStatement statement = null;

        // TODO: need a better way to do this than brute force.. but the iterative approach is too slow
        try (Connection sqlConnection = sqlService.getConnection()) {

            // first remove all enabled overrides with this client uuid
            String queryString = "DELETE FROM " + Constants.DB_TABLE_ENABLED_OVERRIDE +
                " WHERE " + Constants.GENERIC_CLIENT_UUID + "= ? " +
                " AND " + Constants.GENERIC_PROFILE_ID + " = ?";
            statement = sqlConnection.prepareStatement(queryString);
            statement.setString(1, clientUUID);
            statement.setInt(2, profileId);
            statement.executeUpdate();
            statement.close();

            // clean up request response table for this uuid
            queryString = "UPDATE " + Constants.DB_TABLE_REQUEST_RESPONSE +
                " SET " + Constants.REQUEST_RESPONSE_CUSTOM_REQUEST + "=?, "
                + Constants.REQUEST_RESPONSE_CUSTOM_RESPONSE + "=?, "
                + Constants.REQUEST_RESPONSE_REPEAT_NUMBER + "=-1, "
                + Constants.REQUEST_RESPONSE_REQUEST_ENABLED + "=0, "
                + Constants.REQUEST_RESPONSE_RESPONSE_ENABLED + "=0 "
                + "WHERE " + Constants.GENERIC_CLIENT_UUID + "=? " +
                " AND " + Constants.GENERIC_PROFILE_ID + "=?";
            statement = sqlConnection.prepareStatement(queryString);
            statement.setString(1, "");
            statement.setString(2, "");
            statement.setString(3, clientUUID);
            statement.setInt(4, profileId);
            statement.executeUpdate();
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            try {
                if (statement != null) {
                    statement.close();
                }
            } catch (Exception e) {
            }
        }

        this.updateActive(profileId, clientUUID, false);
    }
767583
public function reset($regenerateId) {
        if (!is_bool($regenerateId)) throw new IllegalTypeException('Illegal type of parameter $regenerateId: '.gettype($regenerateId));

        if ($regenerateId) {
            // assign new id, delete old file
            session_regenerate_id(true);
        }

        // empty the session
        $this->removeAttribute(\array_keys($_SESSION));

        // initialize the session
        $request = $this->request;                                              // TODO: $request->getHeader() einbauen
        $_SESSION['__SESSION_CREATED__'  ] = microtime(true);
        $_SESSION['__SESSION_IP__'       ] = $request->getRemoteAddress();      // TODO: forwarded remote IP einbauen
        $_SESSION['__SESSION_USERAGENT__'] = $request->getHeaderValue('User-Agent');

        $this->new = true;
    }
103195
public function remove($id)
    {
        $this->client->delete(Inflector::pluralize($this->getResourceName()).'/'.$id);
    }
12840
public function removeAutoLoginTokenAndCookie(int $id)
    {
        $authtok = new AuthToken($this->db);
        $authtok->setId($id);
        $authtok->deleteUserToken();

        setcookie($this->cookie_name, '', 1, '/');
    }
929520
public function setId($id)
    {
        if (is_null($this->id) && ! is_null($id) && ($model = $this->getRepository()->find($id))) {
            $this->id = $id;

            parent::setModel($model);
            $this->getButtons()->setModel($model);
            $this->setModelClass(get_class($model));
        }
    }
314425
public function delete($id)
    {
        $entity = $this->get($id);

        $this->manager->remove($entity);
        $this->manager->flush();
    }
962429
public function destroy($id)
    {
     	$user_setting = User_setting::findOrfail($id);
     	$user_setting->delete();
        return URL::to('user_setting');
    }
1163428
public function delete($id)
    {
        $this->_deletedDirty = true;

        if (extension_loaded('bitset')) {
            if ($this->_deleted === null) {
                $this->_deleted = bitset_empty($id);
            }
            bitset_incl($this->_deleted, $id);
        } else {
            if ($this->_deleted === null) {
                $this->_deleted = array();
            }

            $this->_deleted[$id] = 1;
        }
    }
819246
protected function setIds($id)
    {
        if ($id) {
            $this->props = $this->mergeProps(array(
                $this->props,
                array(
                    'attribsContainer' => array(
                        'id' => $id.'_container',
                    ),
                    'attribs' => array(
                        'id' => $id,
                    ),
                    'attribsLabel' => array(
                        'for' => $id,
                    ),
                    'attribsHelpBlock' => array(
                        'id' => $id.'_help_block',
                    ),
                ),
            ));
        }
    }
637853
public function removeBindings($id)
    {
        if ($this->hasDefinition($id)) {
            foreach ($this->getDefinition($id)->getBindings() as $key => $binding) {
                list(, $bindingId) = $binding->getValues();
                $this->removedBindingIds[(int) $bindingId] = true;
            }
        }
    }