mirror of
https://github.com/documize/community.git
synced 2025-07-29 18:19:44 +02:00
Improve SQL store for new schema
This commit is contained in:
parent
8ee63de6c7
commit
fe7389e7ca
3 changed files with 4 additions and 4 deletions
|
@ -309,7 +309,7 @@ func (s Scope) ForgotUserPassword(ctx domain.RequestContext, email, token string
|
|||
|
||||
// CountActiveUsers returns the number of active users in the system.
|
||||
func (s Scope) CountActiveUsers() (c int) {
|
||||
row := s.Runtime.Db.QueryRow("SELECT count(*) FROM dmz_user WHERE c_refid IN (SELECT c_userid FROM dmz_user_account WHERE active=1)")
|
||||
row := s.Runtime.Db.QueryRow("SELECT count(*) FROM dmz_user WHERE c_refid IN (SELECT c_userid FROM dmz_user_account WHERE c_active=1)")
|
||||
|
||||
err := row.Scan(&c)
|
||||
if err == sql.ErrNoRows {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue