mirror of
				https://github.com/lingble/chatwoot.git
				synced 2025-10-31 02:57:57 +00:00 
			
		
		
		
	| @@ -110,6 +110,15 @@ class User < ApplicationRecord | |||||||
|     inboxes.where(account_id: Current.account.id) |     inboxes.where(account_id: Current.account.id) | ||||||
|   end |   end | ||||||
|  |  | ||||||
|  |   alias avatar_img_url avatar_url | ||||||
|  |   def avatar_url | ||||||
|  |     if avatar_img_url == '' | ||||||
|  |       hash = Digest::MD5.hexdigest(email) | ||||||
|  |       return "https://www.gravatar.com/avatar/#{hash}" | ||||||
|  |     end | ||||||
|  |     avatar_img_url | ||||||
|  |   end | ||||||
|  |  | ||||||
|   def administrator? |   def administrator? | ||||||
|     current_account_user&.administrator? |     current_account_user&.administrator? | ||||||
|   end |   end | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Arman
					Arman