/** * Tests User->__construct() */ public function test__construct() { $this->User->__construct(); if (get_class($this->User) != 'User') { $this->fail(); } }
public function __construct($id, $mail, $name, $description, $skLeague) { parent::__construct($id, $mail); $this->name = $name; $this->description = $description; $this->skLeague = $skLeague; }
function __construct($uname = null) { parent::__construct(); $this->page_error = ""; $this->setLoginTemplates(); $this->scriptspresent = FALSE; }
/** * Constructor. * The parameter is used for preventing "strict" error. * * @param bool|int $id * * @todo избавиться от hardcoded имен полей формы? */ public function __construct($id = false) { if (isset($_SESSION['UID'])) { $id = $_SESSION['UID']; } parent::__construct($id); }
public function __construct($name, $email) { $this->_date = "11-01-1996"; $this->_type = "Viewer"; $this->_level = 1; parent::__construct($name, $email); }
function __construct(&$db, $id = false) { parent::__construct($db); if (!$id) { $this->id = 0; $this->login = ''; $this->name = ''; $this->family = ''; $this->daddy = ''; $this->mobile_telephone = ''; $this->is_deleted = false; $this->groups = array(); $this->groups_flip = array(); $this->groups_SQL = ''; $this->set_groups_sql = false; return; } $this->id = $id; if (!($row = $this->db->Query_Fetch_Assoc("SELECT * FROM users WHERE id=" . $this->id . " LIMIT 0,1"))) { throw new SysUserError("невозможно создать объект - не найдена запись в БД", $this->id); } $this->login = $row["login"]; $this->name = $row["name"]; $this->family = $row["family"]; $this->daddy = $row["daddy"]; $this->mobile_telephone = $row["mobile_telephone"]; $this->is_deleted = $row["is_deleted"] == 0 ? false : true; if (!($result = $this->db->Query_Fetch("SELECT group_id FROM groups_users WHERE user_id=" . $this->id))) { throw new SysUserError("невозможно создать объект - не найдено записей груп", $this->id, $this->login); } foreach ($result as $row) { $this->groups[] = $row["group_id"]; } }
function __construct($id, $gebruikersnaam = "", $voornaam = "", $achternaam = "", $laatsteOnline = "", $email = "", $mails = 1, $verwijderd = "0") { if ($id == "") { //nieuw personeel parent::__construct($id, $gebruikersnaam, $voornaam, $achternaam, $laatsteOnline, $email); $this->verwijderd = $verwijderd; $this->mails = $mails; if (self::isInPersoneelDatabase($this->id)) { self::setVerwijderd(0); self::setMails($this->mails); self::save(); } else { echo "ik ga personeel toevoegen aan de databank"; $statement = $this->db->prepare("INSERT INTO personeel (userId, mails, verwijderd) VALUES (?, ?, ?)"); echo $this->db->error; $statement->bind_param('iii', $this->id, $this->mails, $this->verwijderd); $statement->execute(); $statement->close(); } } else { if (!is_numeric($id)) { throw new BadParameterException(); } parent::__construct($id); $this->db = DB::getDB(); $statement = $this->db->prepare("SELECT verwijderd, mails FROM personeel WHERE userId = ?"); $statement->bind_param('i', $id); $statement->execute(); $statement->store_result(); $statement->bind_result($this->verwijderd, $this->mails); $statement->fetch(); $statement->close(); } $this->updated = 0; }
public function __construct($name, $login, $password, $role) { parent::__construct($name, $login, $password); $this->role = $role; ++self::$Count; --parent::$Count; }
function __construct($failed = false) { parent::__construct(); if (!$failed) { $this->uid = $this->authorize_cookie(); } }
function __construct($n, $l, $p, $r) { ++self::$cntSUser; parent::__construct($n, $l, $p); $this->role = $r; parent::$cntUser--; }
public function __construct($email, $password, $key) { parent::__construct($email, $password); if ($key != 'AUTOR_DE_PLATZI') { throw new \InvalidArgumentException("Invalid key given"); } }
/** * UserAsCustomer constructor. */ public function __construct($user_id, $email, $password) { parent::__construct($user_id, $email, $password); $this->orders = array(); /*ideiglenesen mert ez egy picitt bonyolult lesz*/ $this->cart = $this->loadCart(); $this->actualOrder = null; }
/** * Constructeur * * @param string $data * @param int $meanOfLogin * @param string $pass * @param string $ip[optional] * @param int $noPass[optional] 1 si connexion sans mot de passe (badgeage simple au foyer) * @param int $poi_id */ public final function __construct($data, $meanOfLogin, $pass, $ip = 0, $noPass = 0, $poi_id) { parent::__construct($data, $meanOfLogin, $pass, $ip, $noPass); $this->poi_id = $poi_id; if ($this->getState() == 1) { $this->state = $this->isAllowedOnPoint($this->poi_id); } }
function __construct($name, $login, $password, $role) { //конструктор parent::__construct($name, $login, $password); $this->role = $role; self::$userCount++; parent::$userCount--; }
/** * Constructor. * * @param CentralAuthenticationStore $cas Shared instance of the credentials store * @param LoggerInterface $logger Shared instance of a Logger class. * @param Curl $curl Shared instance of the Curl class. */ public function __construct($cas, $logger, $curl) { parent::__construct($cas, $logger, $curl); $this->limit = 25; $this->next = 0; $this->previous = 0; $this->fetched_user_data = FALSE; }
function __construct($n, $l, $p, $g) { parent::__construct($n, $l, $p); $this->got = $g; parent::showInfo(); ++self::$hows; --parent::$howu; }
public function __construct($db = null) { if (is_null($db)) { global $dbConfig; } else { $dbConfig = $db; } parent::__construct(new mysqli($dbConfig['host'], $dbConfig['username'], $dbConfig['password'], $dbConfig['dbname'])); }
/** * Constructeur * @param $nom * @param $prenom * @param $edition * @param $biography */ public function __construct($nom, $prenom, $niveau) { parent::__construct($nom, $prenom); $this->niveau = $niveau; //to handle 500 error if ($niveau > 10) { trigger_error('Le modérateur ne peut se voir un niveau supérieur à 10', E_USER_WARNING); } }
public function __construct($role) { if (!empty($role)) { $data = parent::__construct('a', 'b', 'c'); echo $data . ' You role: ' . $role . '<br>'; } else { echo 'Введите роль'; } }
public function __construct($data = array()) { parent::__construct($data); $this->utype = "student"; $this->fname = isset($data['fname']) ? trim($data['fname']) : ""; $this->lname = isset($data['lname']) ? trim($data['lname']) : ""; $this->fullName = $this->fname . " " . $this->lname; $this->title = isset($data['title']) ? $data['title'] : ""; }
public function __construct($data = array()) { parent::__construct($data); $this->compName = isset($data['compName']) ? $data['compName'] : ""; $this->fullName = $this->compName; $this->utype = "employer"; if ($this->displayPic == "default_dp.png") { $this->displayPic = "briefcase.png"; } }
function __construct($uname = null) { parent::__construct(); $this->page_error = ""; $this->registerTemplates = array('register' => 'register', 'address' => 'address', 'block' => 'block'); $this->registerScripts = array('map' => 'map', 'getblocks' => 'getblocks'); $this->setRegisterTemplates(); $this->setMap(); $this->scriptspresent = FALSE; }
/** * The constructor for a Tutor * * @param int $ID * @param int $PIN * @param string $email * @param string $phone * @param Schedule $schedule * @param Timesheet $timesheet * @param string $picture Path to the file that contains the tutors picture * @param string $bio The tutors provided biography */ public function __construct($ID, $PIN, $name, $email = "", $phone = "", $picture = "", $bio = "", Schedule $schedule = null, array $timesheets = array()) { parent::__construct($ID, $PIN, $name); $this->email = $email; $this->phone = $phone; $this->schedule = $schedule != null ? $schedule : new Schedule(); $this->timesheets = $timesheets; $this->picture = $picture; $this->bio = $bio; }
public function __construct($inUserID = 0, $inUserRole = GUEST_ROLE_ID, $inGivenIdentifier = 'anonymous', $inUserName = '******', $inFirstName = 'Anonymous', $inLastName = 'Guest', $inEmail = '*****@*****.**', Link $inProfilePictureLocation = null, DateTime $inBirthday = null, $isLoggedIn = false) { if ($inProfilePictureLocation === null) { $inProfilePictureLocation = new Link('images/defaultUserPicture.png'); } if (!is_bool($isLoggedIn)) { return; } $this->isLoggedIn = $isLoggedIn; parent::__construct($inUserID, $inUserRole, $inGivenIdentifier, $inUserName, $inFirstName, $inLastName, $inEmail, $inProfilePictureLocation, $inBirthday); }
function __construct($id = false, $table = null, $ds = null) { global $databases; if (!defined('DRUPAL_ROOT')) { define('DRUPAL_ROOT', Configure::read('security.drupal_root')); require_once DRUPAL_ROOT . '/includes/bootstrap.inc'; drupal_settings_initialize(); } $this->useTable = $databases['default']['default']['prefix'] . 'users'; parent::__construct($id, $table, $ds); }
public function __construct($user = NULL) { parent::__construct(); self::$fs =& $this->getModule('FS'); if (isset($user)) { $this->user = $user; self::$fs->newAlias('~', 'users/' . $user); } else { $this->user = $this->getUsername(); } }
public function __construct($user, $email, $pass, $phone_number, $first_name, $last_name, $address) { parent::__construct($user, $pass); $this->emailAddress = $email; $this->firstName = $first_name; $this->lastName = $last_name; $this->shippingAddress = $address; $this->phoneNumber = $phone_number; $this->cart = new Cart(); $this->orders = array(); }
public function __construct($user_id) { parent::__construct($user_id); if (!$this->isAdmin()) { // Specialst extends Resident (has more privileges) $this->_loginRedirect(); //log failure $log = debug_backtrace(); throw new Exception('No privileges'); } }
/** * Constructor that will create an object of a recordset of the users table. * If the id is set than this recordset will be loaded. * @param object $db Object of the class database. This could be the default object @b $gDb. * @param object $userFields An object of the ProfileFields class with the profile field structure * of the current organization. This could be the default object @b $gProfileFields. * @param int $userId The id of the user who should be loaded. If id isn't set than an empty object * with no specific user is created. * @param int $organizationId The id of the organization for which the user should be registered. * If no id is set than the user will be registered for the current organization. */ public function __construct(&$db, $userFields, $userId = 0, $organizationId = 0) { global $gCurrentOrganization; $this->sendEmail = true; parent::__construct($db, $userFields, $userId); if ($organizationId > 0) { $this->setOrganization($organizationId); } // create recordset for registration table $this->TableRegistration = new TableAccess($this->db, TBL_REGISTRATIONS, 'reg'); $this->TableRegistration->readDataByColumns(array('reg_org_id' => $this->organizationId, 'reg_usr_id' => $userId)); }
function __construct($mail = "", $mdp = "", $id = "", $ip = "", $nom = "", $prenom = "", $adresse = "", $cp = "", $ville = "", $qualite = "") { parent::__construct($ip); $this->id = $id; $this->nom = $nom; $this->prenom = $prenom; $this->adresse = $adresse; $this->cp = $cp; $this->ville = $ville; $this->qualite = $qualite; $this->mail = $mail; $this->mdp = $mdp; }