/** * Returns <code>true</code> if this user is not able to manage itself.<p> * * @return <code>true</code> if this user is not able to manage itself */ public boolean isManaged() { return (getFlags() & I_CmsPrincipal.FLAG_USER_MANAGED) == I_CmsPrincipal.FLAG_USER_MANAGED; }
/** * Checks if the user is marked as webuser.<p> * * @return <code>true</code> if the user is marked as webuser */ public boolean isWebuser() { return (getFlags() & FLAG_USER_WEBUSER) == FLAG_USER_WEBUSER; }
/** * Checks if the user can be exported.<p> * * @param exportUser the suer to check * * @return <code>true</code> if the user can be exported */ protected boolean isExportable(CmsUser exportUser) { return exportUser.getFlags() < I_CmsPrincipal.FLAG_CORE_LIMIT; }
/** * Checks if the user is marked as webuser.<p> * * @return <code>true</code> if the user is marked as webuser */ public boolean isWebuser() { return (getFlags() & FLAG_USER_WEBUSER) == FLAG_USER_WEBUSER; }
/** * Returns <code>true</code> if this user is not able to manage itself.<p> * * @return <code>true</code> if this user is not able to manage itself */ public boolean isManaged() { return (getFlags() & I_CmsPrincipal.FLAG_USER_MANAGED) == I_CmsPrincipal.FLAG_USER_MANAGED; }
/** * @see java.lang.Object#toString() */ @Override public String toString() { StringBuffer result = new StringBuffer(); result.append("[User]"); result.append(" name:"); result.append(getName()); result.append(" id:"); result.append(m_id); result.append(" flags:"); result.append(getFlags()); result.append(" description:"); result.append(getDescription()); return result.toString(); }
/** * @see java.lang.Object#toString() */ @Override public String toString() { StringBuffer result = new StringBuffer(); result.append("[User]"); result.append(" name:"); result.append(getName()); result.append(" id:"); result.append(m_id); result.append(" flags:"); result.append(getFlags()); result.append(" description:"); result.append(getDescription()); return result.toString(); }
/** * Sets the managed flag for this user to the given value.<p> * * @param value the value to set */ public void setManaged(boolean value) { if (isManaged() != value) { setFlags(getFlags() ^ I_CmsPrincipal.FLAG_USER_MANAGED); } }
/** * Sets the managed flag for this user to the given value.<p> * * @param value the value to set */ public void setManaged(boolean value) { if (isManaged() != value) { setFlags(getFlags() ^ I_CmsPrincipal.FLAG_USER_MANAGED); } }
/** * @see org.opencms.db.I_CmsUserDriver#writeUser(org.opencms.db.CmsDbContext, org.opencms.file.CmsUser) */ public void writeUser(CmsDbContext dbc, CmsUser user) throws CmsDataAccessException { PreparedStatement stmt = null; Connection conn = null; try { conn = getSqlManager().getConnection(dbc); stmt = m_sqlManager.getPreparedStatement(conn, "C_USERS_WRITE_6"); // write data to database stmt.setString(1, m_sqlManager.validateEmpty(user.getFirstname())); stmt.setString(2, m_sqlManager.validateEmpty(user.getLastname())); stmt.setString(3, m_sqlManager.validateEmpty(user.getEmail())); stmt.setLong(4, user.getLastlogin()); stmt.setInt(5, user.getFlags()); stmt.setString(6, user.getId().toString()); stmt.executeUpdate(); } catch (SQLException e) { throw new CmsDbSqlException(Messages.get().container( Messages.ERR_GENERIC_SQL_1, CmsDbSqlException.getErrorQuery(stmt)), e); } finally { m_sqlManager.closeAll(dbc, conn, stmt, null); } internalWriteUserInfos(dbc, user.getId(), user.getAdditionalInfo()); }
user.getLastname(), user.getEmail(), user.getFlags(), System.currentTimeMillis(), user.getAdditionalInfo());
e.addElement(CmsImportVersion10.N_LASTNAME).addText(user.getLastname()); e.addElement(CmsImportVersion10.N_EMAIL).addText(user.getEmail()); e.addElement(CmsImportVersion10.N_FLAGS).addText(Integer.toString(user.getFlags())); e.addElement(CmsImportVersion10.N_DATECREATED).addText(Long.toString(user.getDateCreated()));
e.addElement(CmsImportVersion7.N_LASTNAME).addText(user.getLastname()); e.addElement(CmsImportVersion7.N_EMAIL).addText(user.getEmail()); e.addElement(CmsImportVersion7.N_FLAGS).addText(Integer.toString(user.getFlags())); e.addElement(CmsImportVersion7.N_DATECREATED).addText(Long.toString(user.getDateCreated()));
stmt.setString(3, m_sqlManager.validateEmpty(user.getEmail())); stmt.setLong(4, user.getLastlogin()); stmt.setInt(5, user.getFlags()); stmt.setString(6, user.getId().toString()); stmt.executeUpdate();
u.setUserEmail(m_sqlManager.validateEmpty(user.getEmail())); u.setUserLastLogin(user.getLastlogin()); u.setUserFlags(user.getFlags());
user.getLastname(), user.getEmail(), user.getFlags(), System.currentTimeMillis(), user.getAdditionalInfo());