Index: trunk/core/units/users/users_item.php =================================================================== diff -u -r2663 -r2818 --- trunk/core/units/users/users_item.php (.../users_item.php) (revision 2663) +++ trunk/core/units/users/users_item.php (.../users_item.php) (revision 2818) @@ -33,5 +33,34 @@ $this->SetDBField('Login', $this->GetDBField('Email') ); } } + + function SendEmailEvents() + { + switch( $this->GetDBField('Status') ) + { + case 1: + $this->Application->EmailEventAdmin('USER.ADD', $this->GetID() ); + $this->Application->EmailEventUser('USER.ADD', $this->GetID() ); + break; + + case 2: + $this->Application->EmailEventAdmin('USER.ADD.PENDING', $this->GetID() ); + $this->Application->EmailEventUser('USER.ADD.PENDING', $this->GetID() ); + break; + } + } + + function isSubscriberOnly() + { + $subscribers_group_id = $this->Application->ConfigValue('User_SubscriberGroup'); + $sql = 'SELECT PortalUserId + FROM '.TABLE_PREFIX.'UserGroup + WHERE GroupId = '.$subscribers_group_id.' AND + PortalUserId = '.$this->GetDBField('PortalUserId').' AND + PrimaryGroup = 1'; + return $this->Conn->GetOne($sql) == $this->GetDBField('PortalUserId'); + } + + } ?> \ No newline at end of file