Code Duplication    Length = 10-10 lines in 2 locations

src/protected/controllers/UserController.php 2 locations

@@ 90-99 (lines=10) @@
87
	{
88
		$model = new User();
89
90
		if ($this->saveFromPost($model))
91
		{
92
			$this->log('"%s" created user "%s"', Yii::app()->user->name, 
93
					$model->username);
94
			
95
			Yii::app()->user->setFlash('success', Yii::t('User', 'Created user {username}', 
96
					array('{username}'=>'<em>'.$model->username.'</em>')));
97
98
			$this->redirect(array('admin'));
99
		}
100
101
		$this->render('create', array(
102
			'model'=>$model,
@@ 130-139 (lines=10) @@
127
				$model->password   = $password;	
128
			}
129
			
130
			if ($model->save())
131
			{
132
				$this->log('"%s" updated user "%s"', Yii::app()->user->name,
133
					$model->username);
134
135
				Yii::app()->user->setFlash('success', Yii::t('User', 'Updated user {username}',
136
					['{username}' => '<em>' . $model->username . '</em>']));
137
				
138
				$this->refresh();
139
			}
140
		}
141
142
		$this->render('update', array(