File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
src/Spe/Commands/Security/Accounts Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -93,36 +93,36 @@ protected override void ProcessRecord()
9393 }
9494
9595 var profile = user . Profile ;
96- if ( ! string . IsNullOrEmpty ( FullName ) )
96+ if ( IsParameterSpecified ( nameof ( FullName ) ) && ! string . IsNullOrEmpty ( FullName ) )
9797 {
9898 profile . FullName = FullName ;
9999 }
100- if ( ! string . IsNullOrEmpty ( Comment ) )
100+ if ( IsParameterSpecified ( nameof ( Comment ) ) && ! string . IsNullOrEmpty ( Comment ) )
101101 {
102102 profile . Comment = Comment ;
103103 }
104104
105- if ( ! string . IsNullOrEmpty ( Portrait ) )
105+ if ( IsParameterSpecified ( nameof ( Portrait ) ) && ! string . IsNullOrEmpty ( Portrait ) )
106106 {
107107 profile . Portrait = Portrait ;
108108 }
109109
110- if ( ! ID . IsNullOrEmpty ( ProfileItemId ) )
110+ if ( IsParameterSpecified ( nameof ( ProfileItemId ) ) && ! ID . IsNullOrEmpty ( ProfileItemId ) )
111111 {
112112 profile . ProfileItemId = ProfileItemId . ToString ( ) ;
113113 }
114114
115- if ( profile . Email != Email )
115+ if ( IsParameterSpecified ( nameof ( Email ) ) && profile . Email != Email )
116116 {
117117 profile . Email = Email ;
118118 }
119-
120- if ( User . Current . IsAdministrator && IsParameterSpecified ( " IsAdministrator" ) )
119+
120+ if ( IsParameterSpecified ( nameof ( IsAdministrator ) ) && User . Current . IsAdministrator )
121121 {
122122 profile . IsAdministrator = IsAdministrator ;
123123 }
124124
125- if ( ! string . IsNullOrEmpty ( StartUrl ) )
125+ if ( IsParameterSpecified ( nameof ( StartUrl ) ) && ! string . IsNullOrEmpty ( StartUrl ) )
126126 {
127127 switch ( StartUrl )
128128 {
You can’t perform that action at this time.
0 commit comments