在Bitbucket中查找非活动用户列表? [英] Find the list of inactive users in Bitbucket?

查看:74
本文介绍了在Bitbucket中查找非活动用户列表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何找到从未登录其Bitbucket帐户的用户列表?是否有任何查询或宏,还是我必须手动进行?

How can I find the list of those users who never logged in to their Bitbucket account? Is there any query or macro, or will I have to do it manually ?

推荐答案

您可以使用SQL查询数据库来做到这一点:

You can do this with SQL query to database:

    SELECT cu.lower_user_name
      ,cu.display_name
      ,cu.lower_display_name
      ,cu.lower_email_address
      ,cu.is_active
      ,dateadd(second,cast(cast(cua.attribute_value AS nvarchar(255)) AS bigint)/1000,'19700101 00:00:00:000') AS LAST_LOGIN
  FROM [BitBucketDB].[dbo].[cwd_user] As cu
      LEFT JOIN [BitBucketDB].[dbo].cwd_membership AS cm
        ON cu.directory_id=cm.directory_id
        AND cu.lower_user_name=cm.lower_child_name
        AND cm.membership_type='GROUP_USER'

      LEFT JOIN [BitBucketDB].[dbo].cwd_user_attribute As cua
      ON cu.ID = cua.user_id and cua.attribute_name='lastAuthenticationTimestamp' 
      WHERE cm.lower_parent_name='stash-users' 

这篇关于在Bitbucket中查找非活动用户列表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆