PHP Method User::__construct, codiad Code Examples

This page contains top rated real world PHP examples of method User::__construct from package codiad extracted from open source projects. You can rate examples to help us improve the quality of examples

__construct() public method

public __construct ( )
Example #1
Show file File: UserTest.php Project: swat30/safeballot
0
 /**
  * Tests User->__construct()
  */
 public function test__construct()
 {
     $this->User->__construct();
     if (get_class($this->User) != 'User') {
         $this->fail();
     }
 }
Example #2
Show file File: Team.php Project: Chaos-TIS/letna-liga
0
 public function __construct($id, $mail, $name, $description, $skLeague)
 {
     parent::__construct($id, $mail);
     $this->name = $name;
     $this->description = $description;
     $this->skLeague = $skLeague;
 }
Example #3
Show file File: login_model.php Project: abhipil/hoods
0
 function __construct($uname = null)
 {
     parent::__construct();
     $this->page_error = "";
     $this->setLoginTemplates();
     $this->scriptspresent = FALSE;
 }
Example #4
Show file File: AuthUser.php Project: energine-cmf/energine
0
 /**
  * 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);
 }
Example #5
Show file File: Viewer.php Project: idrisdopico/bap
0
 public function __construct($name, $email)
 {
     $this->_date = "11-01-1996";
     $this->_type = "Viewer";
     $this->_level = 1;
     parent::__construct($name, $email);
 }
Example #6
Show file File: system_user.php Project: newmen/vedro
0
 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"];
     }
 }
Example #7
Show file File: Personeel.class.php Project: BackupTheBerlios/repair-svn
0
 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;
 }
Example #8
Show file File: SuperUser.class.php Project: kapsilon/Specialist
0
 public function __construct($name, $login, $password, $role)
 {
     parent::__construct($name, $login, $password);
     $this->role = $role;
     ++self::$Count;
     --parent::$Count;
 }
Example #9
Show file File: CurrentUser.php Project: rasstroen/sosedi
0
 function __construct($failed = false)
 {
     parent::__construct();
     if (!$failed) {
         $this->uid = $this->authorize_cookie();
     }
 }
Example #10
Show file File: SuperUser.class.php Project: bz4work/spec3
0
 function __construct($n, $l, $p, $r)
 {
     ++self::$cntSUser;
     parent::__construct($n, $l, $p);
     $this->role = $r;
     parent::$cntUser--;
 }
Example #11
Show file File: Author.php Project: takito007/PHP-LARAVEL
0
 public function __construct($email, $password, $key)
 {
     parent::__construct($email, $password);
     if ($key != 'AUTOR_DE_PLATZI') {
         throw new \InvalidArgumentException("Invalid key given");
     }
 }
Example #12
Show file File: UserAsCustomer.php Project: kubu1518/rftCandyShop
0
 /**
  * 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;
 }
Example #13
Show file File: Seller.class.php Project: buckutt/Archives
0
 /**
  * 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);
     }
 }
Example #14
Show file File: SuperUser.class.php Project: Nifler/OOP
0
 function __construct($name, $login, $password, $role)
 {
     //конструктор
     parent::__construct($name, $login, $password);
     $this->role = $role;
     self::$userCount++;
     parent::$userCount--;
 }
Example #15
Show file File: Feed.php Project: rubendgr/lunr
0
 /**
  * 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;
 }
Example #16
Show file File: SuperUser.class.php Project: sowanderr/basic
0
 function __construct($n, $l, $p, $g)
 {
     parent::__construct($n, $l, $p);
     $this->got = $g;
     parent::showInfo();
     ++self::$hows;
     --parent::$howu;
 }
Example #17
Show file File: LoveUser.php Project: highfidelity/love
0
 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']));
 }
Example #18
Show file File: Moderateur.php Project: unpetitlu/poo
0
 /**
  * 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);
     }
 }
Example #19
Show file File: lab1.5.php Project: Arxemond777/News
0
 public function __construct($role)
 {
     if (!empty($role)) {
         $data = parent::__construct('a', 'b', 'c');
         echo $data . ' You role: ' . $role . '<br>';
     } else {
         echo 'Введите роль';
     }
 }
Example #20
Show file File: Student.php Project: idoqo/yedoe
0
 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'] : "";
 }
Example #21
Show file File: Employer.php Project: idoqo/yedoe
0
 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";
     }
 }
Example #22
Show file File: register_model.php Project: abhipil/hoods
0
 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;
 }
Example #23
Show file File: Tutor.php Project: shaunwickett13/GriffTutor
0
 /**
  * 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;
 }
Example #24
Show file File: CurrentUser.php Project: educask/EducaskCore
0
 public function __construct($inUserID = 0, $inUserRole = GUEST_ROLE_ID, $inGivenIdentifier = 'anonymous', $inUserName = 'anonymous', $inFirstName = 'Anonymous', $inLastName = 'Guest', $inEmail = 'anon@anon.ca', 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);
 }
Example #25
Show file File: user_drupal.php Project: roboshed/Zuluru
0
 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);
 }
Example #26
Show file File: UserConfig.php Project: na2axl/FlatOS
0
 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();
     }
 }
Example #27
Show file File: Account.php Project: keniel123/comp2140
0
 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();
 }
Example #28
Show file File: Admin.class.php Project: aparna2206/market-of-mums
0
 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');
     }
 }
Example #29
Show file File: userregistration.php Project: bash-t/admidio
0
 /**
  * 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));
 }
Example #30
Show file File: Membres.php Project: nga28/Haroun
0
 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;
 }