Skip to content

Commit a0fe68b

Browse files
committed
Can bypassing confirm when creating new user
1 parent f07de94 commit a0fe68b

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

gitlab/__init__.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -854,7 +854,13 @@ class User(GitlabObject):
854854
requiredCreateAttrs = ['email', 'username', 'name']
855855
optionalCreateAttrs = ['password', 'skype', 'linkedin', 'twitter',
856856
'projects_limit', 'extern_uid', 'provider',
857-
'bio', 'admin', 'can_create_group', 'website_url']
857+
'bio', 'admin', 'can_create_group', 'website_url',
858+
'confirm']
859+
860+
def _data_for_gitlab(self, extra_parameters={}):
861+
if hasattr(self, 'confirm'):
862+
self.confirm = str(self.confirm).lower()
863+
return super(User, self)._data_for_gitlab(extra_parameters)
858864

859865
def Key(self, id=None, **kwargs):
860866
return UserKey._get_list_or_object(self.gitlab, id,

0 commit comments

Comments
 (0)