Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ##### Generate a dial number for all rooms that don't have one yet
- ```ruby
- BigbluebuttonRoom.where(dial_number: nil).each{ |room| room.update_attributes(dial_number: Mconf::DialNumber.generate) }
- ```
- ##### A user had its email changed in the federation
- ```ruby
- email_old = "old@mail.com"
- email_new = "new@mail.com"
- user = User.where(email: email_old).first
- user.shib_token.update_attributes(identifier: email_new)
- user.update_attributes(email: email_new)
- user.skip_confirmation_notification!
- user.confirm!
- # to confirm that everything's ok
- user.email
- user.shib_token.identifier
- ShibToken.where(identifier: email_old) # should be empty
- User.where(email: email_old) # should be empty
- ```
- ##### Number of users that signed in in the last 30 days
- ```ruby
- User.select { |u| u.last_sign_in_at && (u.last_sign_in_at + 30.days) >= Date.today }.count
- ```
- ##### Invalid join requests = invitations without a role
- ```ruby
- JoinRequest.where(role: nil, request_type: "invite")
- ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement