Lines Matching full:entity

87         $entity = $this->_findUser( $user );
88 if ( $entity > 0 ) {
89 return $this->_checkUserPassword( $entity, $pass );
91 $entity = $this->_findAdmin( $user );
92 if ( $entity > 0 ) {
93 return $this->_checkAdminPassword( $entity, $pass );
114 $entity = $this->_findUser( $user );
115 if ( $entity > 0 ) {
116 $name = "{$this->users[$entity]['first']} {$this->users[$entity]['last']}";
118 if ( ! isset( $this->users[$entity]['mail']) ) $this->_loadMailAddress( $entity );
120 if ( ! isset( $this->users[$entity]['groups']) ) $this->_loadUserGroups( $entity );
123 $groups = $this->users[$entity]['groups'];
136 $data['mail'] = $this->users[$entity]['mail'];
140 $entity = $this->_findAdmin( $user );
141 if ( $entity > 0 ) {
142 if ( ! isset( $this->admins[$entity]['roles']) ) $this->_loadAdminRoles( $entity );
145 $groups = $this->admins[$entity]['roles'];
157 $data['name'] = "{$this->admins[$entity]['first']} {$this->admins[$entity]['last']}";
158 $data['mail'] = $this->admins[$entity]['mail'];
336 * Find user entity from the user data
344 * @return int the entity found in the list of users or -1
353 $entity = 0;
360 $entity = $entry['entity'];
364 $entity = $entry['entity'];
368 if ( $count == 1 ) return $entity;
374 * Check the given password for the given entity (customer) against Magento
378 * @param int $entity the entity of the user
381 protected function _checkUserPassword( $entity, $pass ) { argument
388 …l = "select a.entity_id entity, a.value hash from customer_entity_varchar a where a.attribute_id =…
391 if ( $entity === $row['entity'] ) {
407 * Find administrator entity from the administrator data
413 * @return int the entity found in the list of administrators or -1
422 if ( strnatcasecmp ( $user , $user_id ) === 0 ) return $entry['entity'];
428 * Check the given password for the given entity (administrator) against Magento
432 * @param int $entity the entity of the user
435 protected function _checkAdminPassword( $entity, $pass ) { argument
442 $sql = "select user_id entity,password hash from admin_user where user_id = {$entity};";
445 if ( $entity === $row['entity'] ) {
508 …$sql = "select a.entity_id entity,a.value first,b.value last from customer_entity_varchar a,custom…
510 $this->users[$row['entity']]['entity'] = $row['entity'];
511 $this->users[$row['entity']]['first'] = $row['first'];
512 $this->users[$row['entity']]['last'] = $row['last'];
525 * Load the mail address of the given entity (customer) from Magento
529 protected function _loadMailAddress( $entity ) { argument
530 $this->users[$entity]['mail'] = "default";
538 …$sql = "select a.entity_id entity,a.email mail from customer_entity a where a.entity_id = {$entity
540 if ( $entity === $row['entity'] ) {
541 $this->users[$entity]['mail'] = $row['mail'];
555 * Load the group of the given entity (customer) from Magento
559 protected function _loadUserGroups( $entity ) { argument
560 $this->users[$entity]['groups'] = array();
570 …y_id entity,b.customer_group_code groups from customer_entity a, customer_group b where a.group_id…
572 if ( $entity === $row['entity'] ) {
574 $this->users[$entity]['groups'] = array( $name );
603 …$sql = "select user_id entity,firstname first,lastname last, username user,email mail from admin_u…
605 $this->admins[$row['entity']]['entity'] = $row['entity'];
606 $this->admins[$row['entity']]['user'] = $row['user'];
607 $this->admins[$row['entity']]['first'] = $row['first'];
608 $this->admins[$row['entity']]['last'] = $row['last'];
609 $this->admins[$row['entity']]['mail'] = $row['mail'];
622 * Load the roles of the given entity (administrator) from Magento
626 protected function _loadAdminRoles( $entity ) { argument
627 $this->admins[$entity]['roles'] = array();
640 …type,parent_id parent,tree_level level from admin_role where user_id = {$entity} order by tree_lev…
652 array_push( $this->admins[$entity]['roles'] , $name );