1
0
Fork 0
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:
sauls8t 2018-09-20 17:07:40 +01:00
parent 8ee63de6c7
commit fe7389e7ca
3 changed files with 4 additions and 4 deletions

View file

@ -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 {