155 lines
5.1 KiB
R
155 lines
5.1 KiB
R
% Generated by roxygen2: do not edit by hand
|
|
% Please edit documentation in R/db_users.R
|
|
\name{MNR.DB.Users}
|
|
\alias{MNR.DB.Users}
|
|
\title{MNR database queries for Users}
|
|
\value{
|
|
\if{html}{\out{<list>}} Details of the user denoted by user_id
|
|
|
|
\if{html}{\out{<character>}} The user's name
|
|
|
|
\if{html}{\out{<character>}} A list of user roles
|
|
|
|
\if{html}{\out{<logical>}} TRUE if the user is an administrator
|
|
}
|
|
\description{
|
|
MNR database queries for Users
|
|
|
|
MNR database queries for Users
|
|
}
|
|
\section{Super class}{
|
|
\code{\link[AVSDevR.MarineNoiseRegistry:MNR.DB]{AVSDevR.MarineNoiseRegistry::MNR.DB}} -> \code{MNR.DB.Users}
|
|
}
|
|
\section{Methods}{
|
|
\subsection{Public methods}{
|
|
\itemize{
|
|
\item \href{#method-MNR.DB.Users-new}{\code{MNR.DB.Users$new()}}
|
|
\item \href{#method-MNR.DB.Users-getUser}{\code{MNR.DB.Users$getUser()}}
|
|
\item \href{#method-MNR.DB.Users-getUserName}{\code{MNR.DB.Users$getUserName()}}
|
|
\item \href{#method-MNR.DB.Users-getUserRoles}{\code{MNR.DB.Users$getUserRoles()}}
|
|
\item \href{#method-MNR.DB.Users-isApplicationsAdmin}{\code{MNR.DB.Users$isApplicationsAdmin()}}
|
|
\item \href{#method-MNR.DB.Users-clone}{\code{MNR.DB.Users$clone()}}
|
|
}
|
|
}
|
|
\if{html}{\out{
|
|
<details open><summary>Inherited methods</summary>
|
|
<ul>
|
|
<li><span class="pkg-link" data-pkg="AVSDevR.MarineNoiseRegistry" data-topic="MNR.DB" data-id="getDBClient"><a href='../../AVSDevR.MarineNoiseRegistry/html/MNR.DB.html#method-MNR.DB-getDBClient'><code>AVSDevR.MarineNoiseRegistry::MNR.DB$getDBClient()</code></a></span></li>
|
|
</ul>
|
|
</details>
|
|
}}
|
|
\if{html}{\out{<hr>}}
|
|
\if{html}{\out{<a id="method-MNR.DB.Users-new"></a>}}
|
|
\if{latex}{\out{\hypertarget{method-MNR.DB.Users-new}{}}}
|
|
\subsection{Method \code{new()}}{
|
|
Initialises the instance with a database client from
|
|
\link[AVSDevR.DBClient]{DBClient}
|
|
\subsection{Usage}{
|
|
\if{html}{\out{<div class="r">}}\preformatted{MNR.DB.Users$new(db_client, admin_role_slug = NULL)}\if{html}{\out{</div>}}
|
|
}
|
|
|
|
\subsection{Arguments}{
|
|
\if{html}{\out{<div class="arguments">}}
|
|
\describe{
|
|
\item{\code{db_client}}{<\link[AVSDevR.DBClient]{DBClient}> A DBClient instance}
|
|
|
|
\item{\code{admin_role_slug}}{\if{html}{\out{<character>}} The slug of the application
|
|
administrator role within UserFrosting
|
|
(Defaults to: "application-admin")}
|
|
}
|
|
\if{html}{\out{</div>}}
|
|
}
|
|
}
|
|
\if{html}{\out{<hr>}}
|
|
\if{html}{\out{<a id="method-MNR.DB.Users-getUser"></a>}}
|
|
\if{latex}{\out{\hypertarget{method-MNR.DB.Users-getUser}{}}}
|
|
\subsection{Method \code{getUser()}}{
|
|
Get user information from the database
|
|
\subsection{Usage}{
|
|
\if{html}{\out{<div class="r">}}\preformatted{MNR.DB.Users$getUser(user_id, collect = TRUE)}\if{html}{\out{</div>}}
|
|
}
|
|
|
|
\subsection{Arguments}{
|
|
\if{html}{\out{<div class="arguments">}}
|
|
\describe{
|
|
\item{\code{user_id}}{\if{html}{\out{<integer>}} The user id to fetch}
|
|
|
|
\item{\code{collect}}{\if{html}{\out{<logical>}} Collect the query before returning (TRUE) or
|
|
return the built query object (FALSE)}
|
|
}
|
|
\if{html}{\out{</div>}}
|
|
}
|
|
}
|
|
\if{html}{\out{<hr>}}
|
|
\if{html}{\out{<a id="method-MNR.DB.Users-getUserName"></a>}}
|
|
\if{latex}{\out{\hypertarget{method-MNR.DB.Users-getUserName}{}}}
|
|
\subsection{Method \code{getUserName()}}{
|
|
Get user name from the database
|
|
\subsection{Usage}{
|
|
\if{html}{\out{<div class="r">}}\preformatted{MNR.DB.Users$getUserName(user_id)}\if{html}{\out{</div>}}
|
|
}
|
|
|
|
\subsection{Arguments}{
|
|
\if{html}{\out{<div class="arguments">}}
|
|
\describe{
|
|
\item{\code{user_id}}{\if{html}{\out{<integer>}} The user id to fetch}
|
|
}
|
|
\if{html}{\out{</div>}}
|
|
}
|
|
}
|
|
\if{html}{\out{<hr>}}
|
|
\if{html}{\out{<a id="method-MNR.DB.Users-getUserRoles"></a>}}
|
|
\if{latex}{\out{\hypertarget{method-MNR.DB.Users-getUserRoles}{}}}
|
|
\subsection{Method \code{getUserRoles()}}{
|
|
Get user roles from the database
|
|
\subsection{Usage}{
|
|
\if{html}{\out{<div class="r">}}\preformatted{MNR.DB.Users$getUserRoles(user_id, collect = TRUE)}\if{html}{\out{</div>}}
|
|
}
|
|
|
|
\subsection{Arguments}{
|
|
\if{html}{\out{<div class="arguments">}}
|
|
\describe{
|
|
\item{\code{user_id}}{\if{html}{\out{<integer>}} The user id to fetch}
|
|
|
|
\item{\code{collect}}{\if{html}{\out{<logical>}} Collect the query before returning (TRUE) or
|
|
return the built query object (FALSE)}
|
|
}
|
|
\if{html}{\out{</div>}}
|
|
}
|
|
}
|
|
\if{html}{\out{<hr>}}
|
|
\if{html}{\out{<a id="method-MNR.DB.Users-isApplicationsAdmin"></a>}}
|
|
\if{latex}{\out{\hypertarget{method-MNR.DB.Users-isApplicationsAdmin}{}}}
|
|
\subsection{Method \code{isApplicationsAdmin()}}{
|
|
Check if a user is an application administrator
|
|
\subsection{Usage}{
|
|
\if{html}{\out{<div class="r">}}\preformatted{MNR.DB.Users$isApplicationsAdmin(user_id)}\if{html}{\out{</div>}}
|
|
}
|
|
|
|
\subsection{Arguments}{
|
|
\if{html}{\out{<div class="arguments">}}
|
|
\describe{
|
|
\item{\code{user_id}}{\if{html}{\out{<integer>}} The user id to fetch}
|
|
}
|
|
\if{html}{\out{</div>}}
|
|
}
|
|
}
|
|
\if{html}{\out{<hr>}}
|
|
\if{html}{\out{<a id="method-MNR.DB.Users-clone"></a>}}
|
|
\if{latex}{\out{\hypertarget{method-MNR.DB.Users-clone}{}}}
|
|
\subsection{Method \code{clone()}}{
|
|
The objects of this class are cloneable with this method.
|
|
\subsection{Usage}{
|
|
\if{html}{\out{<div class="r">}}\preformatted{MNR.DB.Users$clone(deep = FALSE)}\if{html}{\out{</div>}}
|
|
}
|
|
|
|
\subsection{Arguments}{
|
|
\if{html}{\out{<div class="arguments">}}
|
|
\describe{
|
|
\item{\code{deep}}{Whether to make a deep clone.}
|
|
}
|
|
\if{html}{\out{</div>}}
|
|
}
|
|
}
|
|
}
|