Class User

ব্যবহারকারী

গুগল ড্রাইভে কোনো ফাইলের সাথে যুক্ত একজন ব্যবহারকারী। File.getEditors() , Folder.getViewers() এবং অন্যান্য পদ্ধতির মাধ্যমে ব্যবহারকারীদের অ্যাক্সেস করা যায়।

// Log the email address of all users who have edit access to a file.
const file = DriveApp.getFileById('1234567890abcdefghijklmnopqrstuvwxyz');
const editors = file.getEditors();
for (let i = 0; i < editors.length; i++) {
  Logger.log(editors[i].getEmail());
}

পদ্ধতি

পদ্ধতি রিটার্ন টাইপ সংক্ষিপ্ত বিবরণ
get Domain() String|null ব্যবহারকারীর অ্যাকাউন্টের সাথে যুক্ত ডোমেইন নামটি খুঁজে বের করে।
get Email() String|null ব্যবহারকারীর ইমেইল ঠিকানা সংগ্রহ করে।
get Name() String|null ব্যবহারকারীর নাম সংগ্রহ করে।
get Photo Url() String|null ব্যবহারকারীর ছবির ইউআরএল সংগ্রহ করে।

বিস্তারিত ডকুমেন্টেশন

getDomain()

ব্যবহারকারীর অ্যাকাউন্টের সাথে যুক্ত ডোমেইন নামটি খুঁজে বের করে।

// Log the domain names associated with all users who have edit access to a
// file.
const file = DriveApp.getFileById('1234567890abcdefghijklmnopqrstuvwxyz');
const editors = file.getEditors();
for (let i = 0; i < editors.length; i++) {
  Logger.log(editors[i].getDomain());
}

ফেরত

String|null — ব্যবহারকারীর অ্যাকাউন্টের সাথে যুক্ত ডোমেইন নাম


getEmail()

ব্যবহারকারীর ইমেল ঠিকানা সংগ্রহ করে। ব্যবহারকারীর ইমেল ঠিকানাটি কেবল তখনই পাওয়া যাবে, যদি ব্যবহারকারী Google+ অ্যাকাউন্ট সেটিংস পৃষ্ঠা থেকে ঠিকানাটি শেয়ার করার বিকল্পটি বেছে নেন, অথবা যদি ব্যবহারকারী স্ক্রিপ্টটি চালনাকারী ব্যবহারকারীর মতো একই ডোমেনের অন্তর্ভুক্ত হন এবং ডোমেন প্রশাসক ডোমেনের মধ্যে থাকা সমস্ত ব্যবহারকারীকে অন্য ব্যবহারকারীদের ইমেল ঠিকানা দেখার অনুমতি দিয়ে থাকেন।

// Log the email address of all users who have edit access to a file.
const file = DriveApp.getFileById('1234567890abcdefghijklmnopqrstuvwxyz');
const editors = file.getEditors();
for (let i = 0; i < editors.length; i++) {
  Logger.log(editors[i].getEmail());
}

ফেরত

String|null — ব্যবহারকারীর ইমেইল ঠিকানা, অথবা ইমেইল ঠিকানাটি উপলব্ধ না থাকলে একটি ফাঁকা স্ট্রিং।


getName()

ব্যবহারকারীর নাম খুঁজে বের করে। ব্যবহারকারীর নাম পাওয়া না গেলে এই মেথডটি null রিটার্ন করে।

// Log the names of all users who have edit access to a file.
const file = DriveApp.getFileById('1234567890abcdefghijklmnopqrstuvwxyz');
const editors = file.getEditors();
for (let i = 0; i < editors.length; i++) {
  Logger.log(editors[i].getName());
}

ফেরত

String|null — ব্যবহারকারীর নাম, অথবা নামটি উপলব্ধ না থাকলে null


getPhotoUrl()

ব্যবহারকারীর ছবির URL খুঁজে বের করে। ব্যবহারকারীর ছবি উপলব্ধ না থাকলে এই মেথডটি null রিটার্ন করে।

// Log the URLs for the photos of all users who have edit access to a file.
const file = DriveApp.getFileById('1234567890abcdefghijklmnopqrstuvwxyz');
const editors = file.getEditors();
for (let i = 0; i < editors.length; i++) {
  Logger.log(editors[i].getPhotoUrl());
}

ফেরত

String|null — ব্যবহারকারীর ছবির ইউআরএল, অথবা ছবিটি উপলব্ধ না থাকলে null

অপ্রচলিত পদ্ধতি