Skip to content

Commit

Permalink
change use of 'admin' to the setting value for the privileged user, a…
Browse files Browse the repository at this point in the history
…lso added some error trapping
  • Loading branch information
dougplant committed Apr 1, 2018
1 parent 7763300 commit 278baba
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion modules/contentclass/index.php
Expand Up @@ -268,7 +268,12 @@ private function removeFromGroup( $classIdentifier, $groupIdentifier )
//--------------------------------------------------------------------------
private function createClass( $displayName, $classIdentifier, $groupIdentifier, $groupId )
{
$adminUserObject = eZUser::fetchByName( "admin" );
$adminUserObject = eZUser::fetch( eepSetting::PrivilegedAccountId );
if( null === $adminUserObject )
{
throw new Exception( "eepSetting::PrivilegedAccountId value of " . $eepSetting::PrivilegedAccountId . " is invalid. Exiting." );
exit( 1 );
}
$adminUserObject->loginCurrent();
$adminUserId = $adminUserObject->attribute( 'contentobject_id' );
$language = eZContentLanguage::topPriorityLanguage();
Expand Down

0 comments on commit 278baba

Please sign in to comment.